I'm new to coding and have encountered a problem.I wrote this script and compiled it with no problems.
I then open a new random chart, say AUDJPY. And then I drop the script on to the chart.But the number being displayed is simply "0.0". See for yourself, I posted a screenshot:
A few seconds later, I close this chart. Open a new one and drop the very same script onto the chart again.This time, it shows me a value, and a correct one at that. See screenshot:
Is there an explanation for this?Could it be my computer being very slow? And it had to wait for a few seconds first before it was able to "pull" this piece of information from the broker? And then, when it already had this piece of info and I tried to retrieve it again, it was able to simply pull it from the history center table (F2)?Because my computer, a notebook from 2007, is indeed super slow (I needed 387ms just to compile this simple script).
Please help, I need to know why this is happening.