Download MetaTrader 5
To add comments, please log in or register
How to use MQL5.community messages editor? Find out in the article!
cryptex23
268
cryptex23 2015.11.26 16:40 

Heloo All,

 My EA uses the below piece of code.

  double vask    = MarketInfo("EURUSD",MODE_ASK);
  OrderSend("EURUSD",OP_BUY,vol,vask,70,0,0,NULL,magic,0,clrRed);

 

I am using this on a USDJPY currency chart. I am getting error code 139.

error code 139 is related to prices. I used normalised function on vask. That didn't help. While if I change the currency to USDJPY and then use plain "Ask", my order goes. Can someone please help me?

whroeder1
13600
whroeder1 2015.11.26 20:55  
  1. 139

    ERR_ORDER_LOCKED

    Order is locked

    Not related to prices
  2. 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.
  3. Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong
/
To add comments, please log in or register