We do not provide development services; any code samples we provide are for education only. If the suggestion earlier in the thread in post #6 did not work when you tried it, and my own suggestion did not work, you may want to try averaging winning and losing trades, rather than using AllTrades or RealtimeTrades.
I am providing help guide documentation for WinningTrades and LosingTrades.
You could add those together and divide by 2. If that does not work, then you will have to develop your own solution. If you develop a solution that works, please consider sharing it with the support forum.
Comment