Break Even

Created at 30 Aug 2014, 16:51
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!
RK

rkokerti

Joined 28.06.2012

Break Even
30 Aug 2014, 16:51


Dear All,

Anyone could help to solve this issue?

I open two Long positions.

1, Position1 (P1)

                SL_1 = 10 pips

                TP_1 = 10 pips

                ExecuteMarketOrder(TradeType.Buy,Symbol,(long)10000,"P1",SL_1,TP_1);  

2, Position2 (P2)

                SL_2 = 10 pips

                TP_2 = 20 pips

ExecuteMarketOrder(TradeType.Buy,Symbol,(long)10000,"P2",SL_2,TP_2);  

 

When market price hit TP1, than P1 close. It’s OK.

My question, how can I move up SL_2 to Break Even at the same time? What is the code?

Thanks in advance!


@rkokerti