I’m trying to create an automated strategy using a script. Everything seems to work correctly, or at least the code compiles without errors. But there must be something I’m missing that’s not showing the created strategy in the strategy window.
I’m fairly new to code, I have some knowledge and can understand what’s written, but I can´t deduce more in deep situations.
For this strategy, I basically copied and pasted the “SampleAtmStrategy” available with NinjaScript so the script could create the AtmStrategy I wanted. Then, I added an instance of an indicator inside (State == State.DataLoaded) with its values, as is also the case with the “SampleMACrossOver” strategy. I also added the indicator declaration at the beginning.
But once compiled, it doesn’t show up in the strategy window. I read the documentation, and it looks I am doing it correctly. I aslo tried exporting and importing the file, but nothing happens.
I’m not entirely sure, but maybe it’s conflicting if you leave the Name the same.
if (State == State.SetDefaults)
{
Description = Custom.Resource.NinjaScriptStrategyDescriptionSampleATMStrategy;
Name = Custom.Resource.NinjaScriptStrategyNameSampleATMStrategy;
// This strategy has been designed to take advantage of performance gains in Strategy Analyzer optimizations
// See the Help Guide for additional information
IsInstantiatedOnEachOptimizationIteration = false;
}