modifystoplossprice to a specific price i.e low of previous candle
modifystoplossprice to a specific price i.e low of previous candle
11 Jul 2020, 18:08
Hi all,
I was wondering if anyone could help with some coding or send me to where I can find the info:
I am wanting to move the stop loss price after each bar (therefore onBar) to the previous days low. How would this be possible?
Many thanks
Samuel
Replies
samuelbreezey
13 Jul 2020, 09:59
RE:
PanagiotisCharalampous said:
Hi Samuel,
You can use ModifyStopLossPrice to do so.
Best Regards,
Panagiotis
Thank you Panagiotis,
I'm sure that was how, thank you. Is there any sample coding? I am wanting to just set the stop loss to the EMA after each bar.
Many thanks
Sam
@samuelbreezey
PanagiotisCharalampous
13 Jul 2020, 10:51
Hi Sam,
Here is an example
var ma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14);
Positions[0].ModifyStopLossPrice(ma.Result.Last(1));
Best Regards,
Panagiotis
@PanagiotisCharalampous
samuelbreezey
13 Jul 2020, 19:53
RE:
Thank you so much :)
PanagiotisCharalampous said:
Hi Sam,
Here is an example
var ma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 14); Positions[0].ModifyStopLossPrice(ma.Result.Last(1));
Best Regards,
Panagiotis
@samuelbreezey
PanagiotisCharalampous
13 Jul 2020, 09:29
Hi Samuel,
You can use ModifyStopLossPrice to do so.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous