Hi,
Is there any good reference to learn to add event handlers in WL5?
It seems that there are some technique to learn to add event handlers in overriding functions, because I can't use my workable code with event handlers directly from C# to WL5.
Size:
Color:
There is no such reference as far I know, perhaps because the developers didn't consider it to be a use case. A WealthScript program is executed once every bar (the Execute method) in WL4 and WL5 alike.
Size:
Color:
QUOTE:
A WealthScript program is executed once every bar...
... better to say:
"In a streaming chart, a WealthScript program is executed each time a new bar is added to the chart (at the end of the Bar interval)."
Size:
Color:
And again, Aleksey is to demonstrate the creation of events in a WL5 strategy:
CODE:
Please log in to see this code.
However I'm at a loss how can this be used for practical purposes for the aforementioned reason.
Size:
Color:
Thanks, it fits my need.
Size:
Color:
If that's not a secret, just curious what you're after with the events in WealthScript code?
Size:
Color:
Is there information how to intercept WealthLab's form events, e.g. FormClosing event when my strategy chart window is closing?
Size:
Color:
Even if you were able to get your hands on the list of open charts through the Application.OpenForms property, it won't help you, because a Wealth-Lab strategy is executed (or public void Execute(), to be precise) only when a complete bar updates (can be 1-minute, 1-day, etc.).
Size:
Color: