1. The problem is the boolean that describes whether you want to close your current trade, if you have one, when the session ends as opposed to letting it run after the current session ends. I want to be able to optimize that boolean. They show up in backtesting, but don't show up in optimization. Well, one of the four does in the first session but does not show up in the other three. In the screen shots, I show those bools in the Strategy Analzyer (backtester) but three of them disappear in the other three sessions when you switch to the optimizer.
2. The one that does show up, is getting optimized whether I want it to or not. In the midnight session, I'm probably going to have that bool set to false so I don't really want to optimize that. But the day session, I will want to optimize it. This is a midnight setting optimization and I've set it to false. As you can see in the screenshots, the optimizer doesn't care what I've set it to - it optimized it anyway.
3. The third issue probably goes without saying because it has to do with a memory leak that multiple people have mentioned for the last several releases. I took note of how much memory was currently being used and it went up by 400 MB after it was done. It's still up by 400 MB three hours later. I'm going to want to run up to six of these at a time like I do with NT 7 and when I do, I'll have to restart NT after each one since the effect of the memory leak is cumulative. I'm not so much concerned with this one as the first two because at least I can still optimize, even if I have to restart Ninja every so often. But I can't really optimize the booleans that I can't see.
Here's my properties code. I'm fairly certain there's nothing wrong with how I'm declaring these properties but here it is anyway since you never know. (It's for all of Session 4, Session 1 is exactly like Session 4 except in the method names there is a '1' instead of a '4', e.g. "ProfitTarget1" instead of "ProfitTarget4". Same for the other sessions:
#region Session 4 [Display(Name="Use Session 4?", Description="Use session 4", Order=1, GroupName="Session 4")] public bool UseSession4 { get; set; } [Range(1, int.MaxValue)] [NinjaScriptProperty] [Display(Name="Session start", Description="Session 4 start time", Order=2, GroupName="Session 4")] public int Session4Start { get; set; } [Range(1, int.MaxValue)] [NinjaScriptProperty] [Display(Name="Session end", Description="Session 4 end time.", Order=3, GroupName="Session 4")] public int Session4End { get; set; } [Range(1, int.MaxValue)] [NinjaScriptProperty] [Display(Name="Profit target", Description="Sets the profit target (in ticks) for Session 4", Order=4, GroupName="Session 4")] public int ProfitTarget4 { get; set; } [Range(1, int.MaxValue)] [NinjaScriptProperty] [Display(Name="Stop loss", Description="Stop loss (ticks). If zero, no stop loss is implied.", Order=5, GroupName="Session 4")] public int StopLoss4 { get; set; } [Range(1, double.MaxValue)] [NinjaScriptProperty] [Display(Name="Max gain", Description="Sets the max gain for Session 4 which, when reached will halt trading.", Order=6, GroupName="Session 4")] public double MaxGain4 { get; set; } [Range(1, double.MaxValue)] [NinjaScriptProperty] [Display(Name="Max loss", Description="Sets the max loss for Session 4 which, when reached will halt trading.", Order=7, GroupName="Session 4")] public double MaxLoss4 { get; set; } [NinjaScriptProperty] [Display(Name="Exit on session close?", Description="Select to exit all trades at the session 4 end time.", Order=8, GroupName="Session 4")] public bool ExitSession4Close { get; set; } #endregion
Comment