Problem with USDJPY

 

Hello,

EURUSD, GBPUSD working with BUY STOP OR SELL STOP but in USDJPY not working...


My code:

            gRecoveryZonePriceSell = NormalizeDouble((Ask/Bid/OrderOpenPrice()- 200*_Point), _Digits);


            gSellStopTicket = OrderSend(_Symbol, OP_SELLSTOP, 0.02, gRecoveryZonePriceSell, Slippage, 0, 0, "Open." + "(" + (string)MagicNumber + ")",MagicNumber);



I have tried Ask/Bid/OrderOpenPrice() not working. I got: 

Invalid Price.

 
Dejan Krapez:

Hello,

EURUSD, GBPUSD working with BUY STOP OR SELL STOP but in USDJPY not working...


My code:

I have tried Ask/Bid/OrderOpenPrice() not working. I got: 

Invalid Price.

It may be related to the digits count

 
Dejan Krapez: P but in USDJPY not working..
  1. “Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
         How To Ask Questions The Smart Way. (2004)
              When asking about code
              Be precise and informative about your problem

    What is the error you get from the OrderSend?

  2. gRecoveryZonePriceSell = NormalizeDouble((Ask/Bid/OrderOpenPrice()- 200*_Point), _Digits);
    USDJPY is about 128. Ask/Bid is about one. 1/128 - 200 points is  0.0058. You'll never see it when the chart is 128±.