StopOutLevel

Created at 22 May 2019, 15:32
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!
YO

yosifov

Joined 19.06.2017

StopOutLevel
22 May 2019, 15:32


Hi,

can somebody post an example of how to use the StopOutLevel within my cBot positions?
 ... public double StopOutLevel{ get; }

Thanks in advance!!


@yosifov
Replies

PanagiotisCharalampous
22 May 2019, 15:36

Hi yosifov,

Your request is not clear. What do you want to use this for?

Best Regards,

Panagiotis


@PanagiotisCharalampous

yosifov
22 May 2019, 15:50

I want my position to get stopped out partially (or get modified)  when I reach my Accout Equity of 50%.

Its not clear in the help how to use this code. .. there is no example.


@yosifov

yosifov
22 May 2019, 16:06

P.S.

when I am backtesting my Accout Equity gets lower than 50% ... and thats not realistic.


@yosifov

PanagiotisCharalampous
23 May 2019, 09:56

Hi yosifiv,

StopOutLevel is related with the level your margin has to reach in order for the stop out process to start. If you just want to modify your position when your equity reaches 50% of the balance just use a condition like below

 if(Account.Equity < Account.Balance * 0.5)

If you want to start stopping out your positions when margin falls below StopOutLevel then you first need to calculate the margin used. In this case, this discussion might be helpful.

Best Regards,

Panagiotis


@PanagiotisCharalampous

yosifov
23 May 2019, 10:00

Hi Panagiotis,

thanks a lot!!! ... that was exactly what I was looking for. :)

Best Regards,
Yosif


@yosifov

Georgefx
27 May 2019, 21:49

I want my position to get stopped out partially (or get modified)  when I reach my Accout Equity of 50%.

Its not clear in the help how to use this code. .. there is no example.