V1 = GETDATA(CODE=SPY:US); V2 = GETDATA(CODE=RSP:US); V3 = GETDATA(CODE=IJH:US); V4 = GETDATA(CODE=IJR:US); V5 = GETDATA(CODE=QQQ:US); V6 = MA(V1, STYLE=Exponential, CALC=Close, BARS=5) > MA(V1, BARS=200, STYLE=Exponential, CALC=Close); V7= MA(V2, STYLE=Exponential, CALC=Close, BARS=5) > MA(V2, BARS=200, STYLE=Exponential, CALC=Close); V8 = MA(V3, STYLE=Exponential, CALC=Close, BARS=5) > MA(V3, BARS=200, STYLE=Exponential, CALC=Close); V9 = MA(V4, STYLE=Exponential, CALC=Close, BARS=5) > MA(V4, BARS=200, STYLE=Exponential, CALC=Close); V10 = MA(V5, STYLE=Exponential, CALC=Close, BARS=5) > MA(V5, BARS=200, STYLE=Exponential, CALC=Close); V11 = (V6+V7+V8+V9+V10); V12 = V11 CrossesAbove 2; V13 = V11 CrossesBelow 3; V14 = V11 > 2; V15 = V11 < 3; IF(V14,BARDATE(V12),BARDATE(V13)) It is picking up 1/21/22 for date of last change. What am I doing incorrectly in script? I want to pick up last change in a script in the header. Thanks, Jamie
1-Trend-Model-Index-Detail.owb (325 KB)