I'm super confused right now, been at this for some time. I'm trying to figure out why this string function won't update the string when I believe the if statement to be true.
void OnTick()
{
string aboveprofit = "";
for(int b=OrdersTotal()-1;b>=0;b--)
{
if(OrderSelect(b,SELECT_BY_POS,MODE_TRADES))
if (OrderSymbol()==Symbol())
{
if(OrderSymbol()==OP_SELL)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid+(150*_Point),OrderTakeProfit(),0,CLR_NONE);
if(Ask < OrderOpenPrice())
{
abovepoint = "321";
}
}
if(OrderSymbol()==OP_BUY)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask-(150*_Point),OrderTakeProfit(),0,CLR_NONE);
if(Bid > OrderOpenPrice())
{
abovepoint = "123";
}
}
}
}
Aucun commentaire:
Enregistrer un commentaire