i have a spread indicator that does:
Closes[1][0] - Closes[2][0];
The problem with the above is that if Closes[2] did not have a value for a paticular point in time, the indicator takes the previous value, which is in a different timeframe. in other words, the value for closes[1] can be at 9 am and closes[2] might be 8 am. Any suggestions on how I can create an index that only compares values when both closes had a value at a paticular time, and ignore other values? I know there is an indicator called 'index' in the indicator seciton, but that doesnt seem to do what I am trying to do.
also just read this;
seems super complicated to me. i'd appreciate a sample code here. pls!
basically i need:
if closes[1][0] & closes[2][0] both had a value at time[0], then do the calculation, if the time for the closes is not the same, ignore.


Comment