Auf die Schnelle mal eine Hilfslösung:
Code:
double TP_Prozent = 10.0;
double TakeProfit = NormalizeDouble(OrderOpenPrice()*(1+(TP_Prozent/100.0)),2);
int TP = TakeProfit;
double Nachkomma = TakeProfit - TP;
if (Nachkomma <= 0.12) TakeProfit = TP;
if (Nachkomma > 0.12 && Nachkomma <= 0.37) TakeProfit = TP + 0.25;
if (Nachkomma > 0.37 && Nachkomma <= 0.62) TakeProfit = TP + 0.5;
if (Nachkomma > 0.62 && Nachkomma <= 0.87) TakeProfit = TP + 0.75;
if (Nachkomma > 0.87) TakeProfit = TP + 1.0;
traderdoc