relative SL and TP

Created at 23 Nov 2020, 21:24
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!
JA

jayteasuk

Joined 25.09.2020

relative SL and TP
23 Nov 2020, 21:24


I have been working with the API to set a SL

 

The description of this field is

Relative Stop Loss that can be specified instead of the absolute one. Specified in 1/100'000 of a unit of the price. For Buy: Stop Loss = Entry Price - Relative Stop Loss, for Sell: Stop Loss = Entry Price + Relative Stop Loss.

 

I have found for nearly all symbol pairs a stop loss of 8 would look like this 8000000 (6 trailing 0's)

 

however i have found that with XPDUSD 7 trailing 0's are required

i thought this might have something to do with the pip position and possibly digits but i tested with XAUUSD and this seems to only require 6 

are there any rules around this i should be taking into consideration?


@jayteasuk
Replies

PanagiotisCharalampous
24 Nov 2020, 08:14

Hi jayteasuk,

As per the documentation

Specified in 1/100'000 of a unit of the price

 So for every one unit price of distance you need need to multiply by 100000 e.g. if you want to set a stop loss at 0.1 distance for XPDUSD, then SL = 0.1*100000. The rule is the same for all symbols.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous