I have some custom strategies that I can't get the settings to save in a template. If I open the strategy new, and load the template (previously saved), it doesn't change the settings.
I edit the "Levels" (in the attached screenshot) from zeros to relevant levels, then apply and save a template. When I reload the strategy and load the template it doesn't work.
Here is a sample of the level Properties:
[NinjaScriptProperty]
[Range(double.MinValue, double.MaxValue)]
[Display(Name="L1", Order=1, GroupName="Levels")]
public double L1
{ get; set; }
[NinjaScriptProperty]
[Range(double.MinValue, double.MaxValue)]
[Display(Name="L2", Order=2, GroupName="Levels")]
public double L2
{ get; set; }
Here is an error I see in the log when I load the strategy:
I've researched regarding the XmlInclude attribute and found the following. However, I'm not sure if or how it should be applied.
public class MyClass
{
// Your code goes here
}
On a side note, I did try saving a Template for the SampleMACrossOver strategy, and it saves and loads just fine.
Thank you for any guidance you can give me,
Michael

Comment