Modify Stop loss price and Modify Take profit price

Created at 07 Apr 2020, 22:37
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!
WI

WienAT

Joined 07.04.2020

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


@WienAT
Replies

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

WienAT
08 Apr 2020, 21:35

RE:

PanagiotisCharalampous said:

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

 

Sorry, I mixed up something. 


@WienAT