I think I found a bug with strategy templates that I've been able to replicate on two different computers, both with version 8.1.2.1 64-bit of the desktop platform.
Here are the steps to replicate it:
1. Open the NinjaScript Editor, open a strategy, for example SampleMACrossOver.
2. Right click, Save As, insert a new name (e.g. MySampleMACrossOver). Compile and exit from the NinjaScript Editor.
3. In the Control Center, Strategy tab: New strategy, select MySampleMACrossOver, change the parameter Fast from 10 to 11.
4. Template, Save, save as "template1".
5. Cancel the strategy creation, New strategy, select MySampleMACrossOver and try to load the template --> it doesn't load anything; it doens't show any error or log message.
I also found a bizarre solution, here the steps:
1. Do ALL of the above steps, then cancel the strategy creation.
2. Open the Strategy analyzer. Don't do anything, close it.
3. In the Control Center, Strategy tab: New strategy, select MySampleMACrossOver. If you try to load the template, you won't be able to: the xml file disappeared.
4. Change the parameter Fast from 10 to 11, save template as "template1".
5. Cancel the strategy creation, New strategy, select MySampleMACrossOver and try to load the template --> now it works.
After this procedure has been done once, templates will work correctly for the MySampleMACrossOver strategy. The Xml files created before and after are identical; however, some magic is done in the Strategy analyzer opening that makes it work. I suspect that probably the Strategy analyzer creates some kind of cache which then makes templates work. Probably there are other ways to do that, like maybe running the strategy once.
I hope my report is cleare and a fix can be implemented for this problem. A less cumbersome procedure for fixing templates would also be appreciated.
Thanks,
Daniele
Comment