Hallo, Top_SecreT,
hab mal versucht Deinen Gedanken umzusetzen. Könnte das so annähernd richtig sei ?
int start()
{
if(OrderSelect(MAGICMA, SELECT_BY_TICKET)==true)
{
switch(OrderType())
{
case OP_BUY:
if (Bid - mindestStopLoss >= OrderOpenPrice + 7* Point)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid + 4 * Point, 0, 0, Blue);
}
case OP_SELL:
if (Ask + mindestStopLoss <= OrderOpenPrice - 7* Point)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid - 4 * Point, 0, 0, Blue);
}
}
}
else
Print("OrderSelect has not been able to find the order ", MAGICMA, ":", GetLastError());
return(0);
}
|