Using Static Variable to Streamline Optimization Process

Hi
I am exploring ways to speed up the amount of time it takes to run optimizations and walk forwards. The rationale is that if certain code remains static during the optimization process, these could be run once at the start and saved for each symbol and then optimization process only focus on variable sections.
The concept seems to work fine in principle. Challenge is that it only works fine with a single symbol but I am optimizing across a watchlist of symbols. So the issue is to link StatvarSet and StatVarGet to the specific symbol in a list and to use this in the optimization process.
A less elegant solution could also be to use AUX1 and AUX2 fields but this will also have a limit of 2 per symbol therefore Static Variables would be preferable.
Any ideas if this is possible?

Not sure about your static variable idea but there was some discussion here about different ways to speed up an optimizaton: Optimizing with a Large Watchlist

1 Like

Problem solved through use of variable and symbol combination:
StaticVarGet("Variable1"+ Name() );

1 Like