When calculating the mAvg_cross_up and mAvg_cross_down. Why are we comparing the previous value of the TRIN with the moving average (mAvg variable) at this time, shouldn't it be compared with the previous moving average.
Thanks! and Regards
In the mAvg_cross_up and mAvg_cross_down code, we are trying to find the first time the value of TRIN crosses its moving average. That's why we checked TRIN is greater than its moving average, and the previous value of TRIN is less than the moving average for the cross up. And TRIN is less than its moving average, and the previous value of TRIN is greater than the moving average for the cross down.