Page 1 of 1

Use of HighD(1) for INTRADAY SIGNALS -- Problem

Posted: Sep 22 2007
by oakshadows
All,

I know that HighD(1) returns the high of yesterday (ie, the high of yesterday's daily bar), and I have successfully charted it as an INDICATOR using intraday data:

plot1(HighD(1), "");

However, I have NOT been successful in using it in a SIGNAL on intraday data. Why doesn't the following code generate an entry signal at HighD(1) when used in a SIGNAL on intraday data? (I get entries, but at the wrong price levels.)

Buy next bar HighD(1) stop;

I have MultiCharts version 2.1.999.999.

Thanks.

Posted: Sep 25 2007
by Marina Pashkova
Hello,

Try the script below. It should work:

value1 = HighD(1);
if value1 <> -1 then
buy next bar value1 stop;


Regards.

Posted: Sep 25 2007
by oakshadows
Marina, it works. Thank you for your help.

Posted: Sep 26 2007
by Marina Pashkova
You're welcome!