I'm customizing the indicator Position Display Indicator:
https://ninjatraderecosystem.com/use...lay-indicator/
Adding it some features, and what I'm actually needing is a way, hopefully a short way, to specify into the code that if any condition is met then the Market Replay process be paused inmediately. The idea is to have a strategy running and if the Account Balance = any specific custom value, for example $500.00, then the Market Replay process automatically get paused in order to be able to analyze what was wrong and that need to be improved. Please note I'm talking about to just pause the process, not to stop the process or to close the Playback connection, because the idea is to be able to analyze what happened and if you stop the process or the connection, then everything will reset to "zero" and you will have to start over.
The code basic idea would be something like the next:
// code portion with '...' where extra code is needed but not written to not to have a very large message ... private double NetLiquidation; ... if (NetLiquidation =< 500.00) { // code to [B]pause [/B]the Market Replay process // and also print the message "[COLOR=#c0392b][B]The strategy has failed to meet the minimum necessary requirements at [U]hh:mm:mm a/pm[/U], on [U]Mmm DD, YYYY[/U][/B][/COLOR]" } else { // permanent printing the message "[COLOR=#27ae60][B]The strategy is in positive territory, you can continue trading[/B][/COLOR]" until NetLiquidation > 500.00 } ...
Thank you
Comment