I am adding TSSuperTrend for my indicator Exit Strategies in the following manner:
if (TSSuperTrend(3,TradingStudies.NinjaScript.Utility .MovingAverageType.HMA,1.99,8,TradingStudies.Ninja Script.Utility.SuperTrendMode.ATR).DownTrend.Conta insValue(0) && !ExitLongDone)
ExitLongProcess();
else
if
TSSuperTrend(3,TradingStudies.NinjaScript.Utility. MovingAverageType.HMA,1.99,8,TradingStudies.NinjaS cript.Utility.SuperTrendMode.ATR).UpTrend.Contains Value(0) && !ExitShortDone)
ExitShortProcess();
Adding this, when the indicator is called, Window Task Manager reported a quickly ascending memory usage, till about 1.6 GB when it ninja get exception and need to shutdown.
I have used similar construct to add other indicators as exit strategies without any issue, normally just adding a few MB to memory usage.
Is there anything wrong with TSSuperTrend?
If one construct strategy using the Wizard and add the TSSuperTrend, it would also results in "out of memory" when executed.
Would appreciate your help on this issue.
Thanks.
Regards.
Edward K
Comment