Modify Stop loss price and Modify Take profit price
Modify Stop loss price and Modify Take profit price
07 Apr 2020, 22:37
Dear all,
I am testing one bot and there is one thing that is not really clear to me:
I open position with following command:
ExecuteMarketOrder(TradeType.Buy, position.SymbolName, volume, "Buy");
Since there is no option that I execute trade with already setted SL price and TP price (i do not want to set number of pips for TP and SL) I am doing following:
Positions[Positions.Count - 1].ModifyStopLossPrice(entrypositionprice);
Positions[Positions.Count - 1].ModifyTakeProfitPrice(takeprofitprice);
In this case both SL price and TP price are correctly moved. I see also in debugger Visual Studio:
But if I check my console in Ctrader i see following:
What could be wrong?
Regards
PanagiotisCharalampous
08 Apr 2020, 08:30
Hi WienAT,
Are you sure you are looking at the correct position? SL and entry price also seem different.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous