ModifyPosition

Created at 21 Jan 2019, 12:19
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!
PM

pmcarvalho

Joined 16.01.2019

ModifyPosition
21 Jan 2019, 12:19


Hi

I'm trying execute the function ModifyPosition and i get the "TechnicalError" error:

21/01/2019 10:12:20.384 | → Modifying position PID91151261 (SL: 1,51024, TP: null) FAILED with error "TechnicalError", Position PID91151261

Is a Sell position and the EntryPrice is 1,51168 and the actual StopLoss is 1,54168.

Code:

ModifyPosition(p, priceSL.Value, 0);

I had already trayed :

- ModifyPosition(p, priceSL.Value, null);

- ModifyPositionAsync(p, priceSL.Value, null);

- ModifyPositionAsync(p, priceSL.Value, 0);

I really don't know what to do anymore.

Thanks

 


@pmcarvalho
Replies

TonNcie
25 Jan 2019, 09:25

How is priceSL defined?
How is p retrieved?


@TonNcie

PanagiotisCharalampous
25 Jan 2019, 09:47

Hi pmcarvalho,

Try the below

ModifyPosition(p, Math.Round(priceSL.Value, Symbol.Digits), null)

Best Regards,

Panagiotis


@PanagiotisCharalampous