Topic: Saving Strategy Slot Status with the Strategy File

I have a number of template strategies that I like to use as a starting point for the generator (rather than entering my strategy settings in each time), although the Strategy Slot Status (Open, Locked, Linked) is not saved out to the strategy.xml file so some settings need to be made manually each time the generator dialog is opened.

Working through the code I can see that the strategy slot information is stored in the xml file as follows:

<slot slotNumber="0" slotType="Open">

It was a fairly simple change to modify my code to read/write the slotStatus to/from the xml file, so my strategy files now appear similar to:

<slot slotNumber="0" slotType="Open" slotStatus="Open">

When working through the GeneratorGUI.cs code in an effort to save the information when a generated strategy has been accepted, I notice that there is code that always sets the status of all strategy slots back to "Open" called from a number of locations within the generator code, eg:

Data.Strategy = ClearStrategySlotsStatus(Data.Strategy)

I don't seem to be able to find any clear reason why the slot status can't be set to "Open", "Locked', or "Linked" for the life of the strategy, and am unable to find any difference in application behaviour using a build that makes no changes to slot status within the strategy (ie. the "Open", "Locked', or "Linked" status value is retained by the strategy and not forcibly set to "Open").

In fact, I cannot find anywhere in FSB (other than in the generator code) where the strategy slot status is even referred to.

Does anyone know why ClearStrategySlotsStatus() is needed?

Does anyone see any reason why we need to keep the ClearStrategySlotsStatus() functionality in FSB.

The removal of ClearStrategySlotsStatus() would allow users to save template strategies for use in the generator, which is an obvious timesaver when trying to start to generator from a number of defined starting points.

Re: Saving Strategy Slot Status with the Strategy File

You are right. slotStatus is used only in Generator. I'll ad an option in Generator settings to allow saving slot status of the strategy. Using templates for Generator is very constructive idea.