Open and Close 30% below day's high

Hi Optuma

I am trying to highlight bars that have an open and close minimum 30% below the bar’s high and have written some simple code
but I can’t get any results to show up when applying showview or showbar function.
Could you please identify any coding errors for me.

//Calc High 
V1 = HIGH(BARS=0, BACKTYPE=Days); 
//Calc Open and Close minimum 30% below day's high 
V2 = CLOSE() <= (V1*.70); 
V3 = OPEN() <= (V1*.70); 
V1 and V2 and V3

Thanks guys.

Hi,

There are a few errors with the script you posted.

With V1, the High function doesn’t support Bars or Backtype days, for your script the High() is all you need.

Also, only V2 and V3 are Boolean, so the last line should not be referencing V1.

The final adjusted script would look like this:

V1 = HIGH() * 0.7;
V2 = CLOSE() <= V1;
V3 = OPEN() <=  V1;
V2 and V3

This script returns results, here’s an example:

Ex1