StopLoss - Last Low Price
Created at 25 Aug 2020, 07:56
RA
StopLoss - Last Low Price
25 Aug 2020, 07:56
Good night cTrader friends ...
I'm trying to implement a code from my Bot that executes the purchase order, and puts a stop exactly on the low price of the previous candle, and projects a take profit of 1.5.
But I'm having a hard time doing this, could someone please help me solve this issue?
Replies
raphael.mca@hotmail.com
26 Aug 2020, 19:25
RE:
PanagiotisCharalampous said:
Hi Raphael,
See an example below
var position = ExecuteMarketOrder(TradeType.Buy, Symbol.Name, 1000).Position; position.ModifyStopLossPrice(Bars.Last(1).Low); var takeProfit = position.EntryPrice + ((position.EntryPrice - position.StopLoss) * 1.5); position.ModifyTakeProfitPrice(takeProfit);
Best Regards,
Panagiotis
Thank you very much my friend ... it worked perfectly!
@raphael.mca@hotmail.com
PanagiotisCharalampous
25 Aug 2020, 08:03
Hi Raphael,
See an example below
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous