Chart Script Code

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
dan2fl
Posts: 7
Joined: Thu Oct 02, 2014 1:00 pm

Chart Script Code

Post by dan2fl »

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
Chris White
Posts: 201
Joined: Mon Nov 29, 2010 9:21 pm

Re: Chart Script Code

Post by Chris White »

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):

Code: Select all

event: REF(C, 1) < REF(H,2);
Post Reply