How do you calculate how many ticks of profit been made?
Created at 12 Mar 2023, 05:00
How do you calculate how many ticks of profit been made?
12 Mar 2023, 05:00
position.NetProfit property gives you an amount you made.
Is there anything like position.NetProfitInTicks ?
If not, how can I calculate my profit in ticks when a trade closes?
Thank you very much.
Replies
pick
13 Mar 2023, 12:37
There is a variable for pips. Or you could calculate it manually from "EntryPrice" and "ClosingPrice" from the HistoricalTrade interface.
@pick
firemyst
13 Mar 2023, 07:29
Would it just be as easy as:
1) set a tickCount variable to zero (0) when your order is successful
2) while in the position, on each "OnTick" event, add 1 to your variable.
3) when the position is closed, save the tick count.
??
@firemyst