My strategy contains some heavy processing just to display things (like zigzag vertical lines).
When optimizing, I'd like to suppress this processing.
How can I determine whether Execute() was called from the optimizer or just by activating the 'Go' buttom?
Size:
Color:
You don't have to suppress processing of cosmetic chart methods because the Optimization and the Strategy Monitor tool skip the drawing stuff.
Size:
Color:
QUOTE:
How can I determine whether Execute() was called from the optimizer or just by activating the 'Go' buttom?
See ChartPane object > "IsPricePane Property" or Cosmetic Chart > "ChartStyle Property" in the QuickRef.
Size:
Color:
It's not only the cosmetic charting that I want to suppress but foremost the extensive preprocessing that takes place before that happens.
And yes, this helped, thank you very much! Refering to the QuickRef you mentioned, IsStrategyMonitor() is true while optimizing, and false when pressing "Go". This is exactly what I was looking for.
By the way, do you have a list of all callback routines like IsStrategyMonitor()?
Size:
Color:
The QuickRef contains all supported WealthScript functions. Where did you find IsStrategyMonitor?
Size:
Color:
For completeness: taken from QuickRef
CODE:
Please log in to see this code.
:
Size:
Color:
So, IsStrategyMonitor() is a private boolean method [that Eugene or I created] which determines if a Chart is displayed while the script is running. :)
Size:
Color: