Problem with pending order

 

I use this code to open a pending order at 100 pips under current price, but it opens a market order at the current price please guide me

double point = MarketInfo("EURUSD",MODE_POINT);

OrderSend("EURUSD",0,.01,MarketInfo("EURUSD",MODE_ASK)-100*point,3,0,0,"",0,0,Green);

 
OrderSend("EURUSD",OP_BUYLIMIT,.01,MarketInfo("EURUSD",MODE_ASK)-100*point,3,0,0,"",0,0,Green);
point needs to be calculated for the relevant pair
 
Thanks man
 
GumRai: point needs to be calculated for the relevant pair
Point is a predefined variable. This is why I say:
Do not trade multiple currencies
  • You can't use any predefined variables, can't use the tester, must poll (not OnTick,) and usually other problems.
  • Code it to trade the chart pair only. Look at the others if you must.
  • Then put it on other charts to trade the other pairs. Done.
Reason: