I am having a little trouble getting this to work with a Array. Attached is the sample MA cross over strategy.
What I would like to try is to use the Daily LogReturnsZScore set to COBC = False (so it will fluctuate moment by moment) and use it as a broad filter before all my other conditions will fire intraday.
For example, for Longs I may want to have the Daily LogReturnsZScore while in COBC = False to be 0.30 or greater before executing other conditions for a trigger to go long. Then, the exact opposite for Shorts.
My issue is that I have typically used only the current bar series for conditions. I have played with Bar Arrays in the past and got them to work but never quite right. So, I decided to just keep the code clean without using Arrays (thereby having a lot less to go wrong/break). However, I like this idea and with just one Array condition I think it may be ok for my purposes.
I have attached the stategy and the LogReturnsZScore indicator.
Could you show what should be added to the sample MA strategy below to allow for this please (if you could highlight the sections you change in the code that would be great)?

Comment