I am trying to simplify some code and would be grateful for some assistance.
Let's say I write a bool series that says none of the last 21 bars can be dojis - call it noDojisB20ToB0[0] = true. Then in sections of the code I may want individual bars within that last 20 to be a doji. Rather than writing the entire code again to exclude all bars from being dojis except say bar[5], can I do something like:
if(noDojisB20ToB0[0] == true && dojiBar[5] == true)
{Action}
This does not appear to work at the moment because the bool series part of the code has already made dojiBar[5]==false, and I am now trying to make it true without having to rewrite all the other 19 dojis which are false. Is there a way of doing this?
Thank you.
Comment