Hey everyone,
I've written a script that will plot profit targets when I double click on a bar in my screen.
Everything works great, but there is one thing that I would like to address.
When I switch time frames the data is no longer displayed. It's obvious why this is happening and it is because the screen is being re-drawn.
Currently I maintain an associative array which maintains which bars should have this feature active.
What I would like to know is how scoping works with EFS, at what point in time would this variable be lost? When I switch a timeframe and the page is redrawn are these variables lost or still maintained? Are global variables kept across these switches?
Also, is there a means to detect when the screen is being redrawn? Would I be looking for the BARSTATE_ALLBARS flag being set as the current bar state?
I appreciate any info.
I've written a script that will plot profit targets when I double click on a bar in my screen.
Everything works great, but there is one thing that I would like to address.
When I switch time frames the data is no longer displayed. It's obvious why this is happening and it is because the screen is being re-drawn.
Currently I maintain an associative array which maintains which bars should have this feature active.
What I would like to know is how scoping works with EFS, at what point in time would this variable be lost? When I switch a timeframe and the page is redrawn are these variables lost or still maintained? Are global variables kept across these switches?
Also, is there a means to detect when the screen is being redrawn? Would I be looking for the BARSTATE_ALLBARS flag being set as the current bar state?
I appreciate any info.
Comment