I hope you are all having a good day,
I have an indicator which sets global variables for the current bar and previous bar bar[0],bar[1]
the indicator updates on every tick though so the values are chaging all the time - this has created a problem because on odd occassions it reads a 0 value rather than the true value (maybe when updating i am not sure why) I though if i collected the values on the first tick of a new bar for the 2 previous candles and stored them as curr and prev then this may help avoid my problem.
Can some one help me on how i can collect the values on the first tick of a new bar.
mysignal1=GlobalVariableGet(curr);
mysignal2=GlobalVariableGet(prev);
thank you
I have an indicator which sets global variables for the current bar and previous bar bar[0],bar[1]
the indicator updates on every tick though so the values are chaging all the time - this has created a problem because on odd occassions it reads a 0 value rather than the true value (maybe when updating i am not sure why) I though if i collected the values on the first tick of a new bar for the 2 previous candles and stored them as curr and prev then this may help avoid my problem.
Can some one help me on how i can collect the values on the first tick of a new bar.
mysignal1=GlobalVariableGet(curr);
mysignal2=GlobalVariableGet(prev);
thank you