SmartCoder
New member
Hi,
I have the following code in a fold statement:
This generates the right number as I have tested it on the chart. Now, I am trying to run the following code:
I am getting the error that I can only put constants in this expression " indicator[recentGreenBack ] " Could someone please explain how I can convert the recentGreenBack to a constant?
Thanks
I have the following code in a fold statement:
Code:
def recentGreenBack = fold x = 1 to 21 with green = 0 while green == 0 do if indicator[x] == 1 then x else 0;
This generates the right number as I have tested it on the chart. Now, I am trying to run the following code:
Code:
def cond1 = indicator[recentGreenBack ] == 1;
I am getting the error that I can only put constants in this expression " indicator[recentGreenBack ] " Could someone please explain how I can convert the recentGreenBack to a constant?
Thanks