"TechnicalError" only on USDJPY

Created at 27 Jun 2018, 21:37
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
sifneos4fx's avatar

sifneos4fx

Joined 15.11.2017

"TechnicalError" only on USDJPY
27 Jun 2018, 21:37


Hello all

This is how I sent an order:

//if (PlaceStopOrder(TradeType.Sell, Symbol, volume, Symbol.Ask + Symbol.PipValue * _stop_order_treshold, volatility.ToString(), stopLossPips, takeProfitPips, Server.Time.AddMinutes(_order_exp_min)).IsSuccessful)
            if (!ExecuteMarketOrder(TradeType.Sell, Symbol, volume, TradeComment, stopLossPips, takeProfitPips, Slippage, TradeComment).IsSuccessful)
            {
                Thread.Sleep(800);
                return false;
            }

This are the values I Use:
Buy, USDJPY (Ask: 110.186, Bid: 110.182), 456000, USDJPY, 26.518088252584, 30.2819117474158, 0.3, USDJPY
 

 

This is the log entry:
27/06/2018 20:23:55.364→ Executing Market Order to Buy 456000 USDJPY (SL: 26.518088252584, TP: 30.2819117474158, MR: 0.3) FAILED with error "TechnicalError"

 

And this is the journal entry:
27/06/2018 20:23:55Request to Buy $ 456k USDJPY (Price: 110.186, SL: 26.518088252584, TP: 30.2819117474158, MR: 0.3) is sent to server
27/06/2018 20:23:55→ Order OID0 is REJECTED with error "INVALID_REQUEST"

 

Any ideas how to debug this?

Best,
Patrick


@sifneos4fx
Replies

sifneos4fx
28 Jun 2018, 10:55

Figured it out, to many decimal point on S/L and T/P.

 

if (!ExecuteMarketOrder(TradeType.Sell, Symbol, volume, TradeComment, Math.Round((double)stopLossPips), Math.Round((double)takeProfitPips), Slippage, TradeComment).IsSuccessful)

 


@sifneos4fx

PanagiotisCharalampous
28 Jun 2018, 10:57

Hi Patrick,

Can you please try rounding SL and TP values to the decimal places allowed by the symbol and let me know if this resolves the issues?

Best Regards,

Panagiotis


@PanagiotisCharalampous