Helkin Ashi code works fine on its own but adding the trend code I get many errors with the Initialize it says no suitable method to overiride.
I any one has a similar code or can help me out.
I believe the problem area is not so much the second period. It is the Sum statement.
I am trying to convert a thinkorswim script to Ninjascript.
in TOS it is:
def O1 = open( Period = agg);
def C1 = close( Period = agg);
def H1 = high( Period = agg);
def L1 = low( Period = agg);
def Adata = Sum((O1 + H1 + L1 + C1) / 4, 6) / 6;
What I have written for Ninjascript is:
ADATA(BarsArray[0])[0] = SUM((O1 + H1 + C1 + L1)/4,6)/6; but the error is best overloaded match has some invalid arguments and cannot convert from double to series<double>.
If I can get past this I think I will be ok.
Comment