Hi,
I am trying to code:
"Yesterdays Close is less than the High of two days ago"
I thought it rather simple and wrote
Cond1:= C,1 < H,2; but that does not work.
I then tried
Cond1:=REF (C,1) < REF ( H,2);
still with no success.
Does anyone have a suggestion?
Thanks,
Dan
Chart Script Code
Moderator: Chris White
-
- Posts: 212
- Joined: Mon Nov 29, 2010 9:21 pm
Re: Chart Script Code
You have the correct syntax in your second attempt, but no output would be shown on the chart or available in a template because you used := instead of just :
:= means calculate and assign the result to the named variable
: means calculate and assign the result to the named variable and make it an output.
Here's the correct code (i used event as the named variable in this case):
:= means calculate and assign the result to the named variable
: means calculate and assign the result to the named variable and make it an output.
Here's the correct code (i used event as the named variable in this case):
Code: Select all
event: REF(C, 1) < REF(H,2);