private int outputTab; /// up top
And in Properties section:
[NinjaScriptProperty]
[Range(1, 2)]
[Display(Name="OutputTab", Description="OutputTab", Order=6, GroupName="Parameters")]
public int OutputTab
{
set { outputTab = value; }
}
Then a statement like:
PrintTo = (outputTab==1? PrintTo.OutputTab1:PrintTo.OutputTab2);
ClearOutputWindow(); in OnStateChange would direct the output properly after clearing it when starting a new strategy.
Then oddly that just seemed to stop working and I was only able to get it to start working again if I put the above statement into the OnBarUpdate method so it was reinitialized each time.
Now that I'm no longer using that statement for some reason my code is always printing to OutputTab2.
Worse, when opening a strategy on a chart (ctrl+s) to check parameters or to stop it so I can examine the output tab the output tab immediately clears itself which is very unhelpful.
I don't have any ClearOutputWindow(); statements anywhere in the code.
This all seems to be very different from how the output tab was initially working where among other things described above, after stopping a script the output would remain in the output tab.
Any ideas?


Comment