Help with nesting of MA function in a formula

What im trying to do is to create a MOVING AVERAGE of a custom script formula as per below

Then I would like to create a SHOW BAR of the CROSSOVERS of the MA vs the Script etc

Ive got the initial script working fine as below:

V1 = CHANGE(INT_TYPE=Week, INT_COUNT=26)/100;
V2 = CHANGE(INT_TYPE=Week, INT_COUNT=13)/100;
(V10.5+V20.25)/2

My issue is trying to create the NESTED script to calculate a 10 period WEEKLY SIMPLE MOVING AVERAGE of the above - but it’s just giving me an error “please enter a valid script to add this criteria”

V1 = CHANGE(INT_TYPE=Week, INT_COUNT=26)/100;
V2 = CHANGE(INT_TYPE=Week, INT_COUNT=13)/100;
MA(Week(PERIODAMOUNT=10), CALC=(V10.5+V20.25)/2))

Any ideas?

Hi Zac,

You need to nest the result in an MA() function. Also, if placing on a weekly chart or watchlist you don’t need to reference the timeframe:

V1 = CHANGE(INT_TYPE=Week, INT_COUNT=26)/100;
V2 = CHANGE(INT_TYPE=Week, INT_COUNT=13)/100;
V3 = (V1*0.5+V2*0.25)/2;
MA(V3, CALC=Close, BARS=10)