I have what is probably a simple question for most of you more experienced programmers. I have a simple script that is calculating an open vs. close price difference for a range of bars using a 30 min period. I want to use the first days close price as the base(start) value for all following calculations within the onbarupdate. I entered in the close of the first day using the onstartup. So I'm getting the correct base value, but Im not sure how to use it only once for the first calculation as the onbarupdate repeatedly adds it instead of only the first time. Any suggestions or advice on how to get around this?
Thanks for the help,
Lee
Comment