May you help me to translate this indicator in LUA Language:
a1:=(hhv(pr,tpr)+llv(pr,tpr)+pr)/3;
b:=(a1*2)-hhv(pr,tpr);
mab:=mov(b,tpr,s);
c1:=(a1*2)-llv(pr,tpr);
mac1:=mov(c1,tpr,s);
a:=(hhv(pr,tpr/2)+llv(pr,tpr/2)+pr)/3;
maa:=mov(a,tpr/2,s);
d:=(b+c1+a)/3;
mad:=mov(d,tpr,s).
hhv= max period value (the highest value of close in the time period chosen)
llv= min period value (the lowest value of close in the time period chosen)
pr=close price
tpr=time period (from 1 to whatever you want)
mov= moving average.
Thanks.
This forum is great......
Lucmat