How get Pips in real time

Created at 27 Apr 2021, 19:19
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!
PR

progy85

Joined 07.01.2021 Blocked

How get Pips in real time
27 Apr 2021, 19:19


Hi,


I need to get pips on tick and after pips go to under -10 then open new trade (do not close trade with negative pips).

 

I have tried with Positions.Pips on tick but not works.
With function

   private void OnPositionsClosed(PositionClosedEventArgs args)
        {


only works if trade will closed.


Replies

amusleh
28 Apr 2021, 09:57

Hi,

You should iterate over your positions by using the Positions collection in OnTick method, not in OnPoisitionClosed event handler.


@amusleh