nelson55117-9
You omitted to declare bInit as a global variable and to set it initially to false ie var bInit = false;
Also the whole preMain() function appears to be missing from the script (assuming you did not specifically want it to be plotted as a separate indicator)
See also the comments posted in this thread
Alex
Originally posted by nelson55117-9 Getting Error Message with this piece of code:
Comment