I am trying to come up with a simple trend model:
v1 = MA(BARS=8, CALC=Close);
v2 = MA(BARS=21, CALC=Close);
v3 = MA(BARS=89, STYLE=Exponential, CALC=Close);
if v1 > v2 and v2 > v3 = 1
if v1 > v2 and v2 < v3 = 2
if v1 < v2 and v2 > v3 = 3
if v1 < v2 and v2 < v3 = 4
What would be the best way to handle these if statements?