For ticker symbol CUB, BarsSince returns -1e+010. I notice in this situation, all Close values are above 50MA. Possible to make it return the bar value since close is less or equal to 50MA or when 50MA change from EMPTY to non EMPTY?
Thanks in advance.
This screen image of CUB might help provide a better picture. Since CUB is rather a new ticker, there is no 50MA before the 50th bar so the 50MA is empty before the 50th bar. However, from the 50th bar onward, the 50MA is not empty. The BarsSince( Close <= MA_50 ) is never triggered because all the Close values are above MA_50. I need to track the number of bars when is Close is above MA_50. Can the transition empty MA_50 to non-empty be used as a trigger ? Thanks in advance.