The NS strategy responds to button clicks on a Form through an event handler. The Event handler is a seperate method, outside of the OnBarUpdate()method. It works as Folls had intended.
I would like to know the last traded price, at the time a button is pushed. I've tried unsuccessfully to access Close[0] within the Event handler method. A run time error occurs.
1: Is is possible to access price data, outside of the OnBarUpdate() Method. Specifically in the event handler method?
2: Or do I have to set CalculateOnBarClose=False, set a Flag in the event handler when a button is clicked, and read price in the OnBarUpdate() Method. Then reset the event handler Flag and wait for the next event?
thanks,
Phineas
Comment