# Subscript using < issue

Need find H value > BV1 and to the left of xBV1. BV1 fine, but BV2 and BV values in Analysis 1 or 0 rather H price.

``````_section_begin("BV_Enter");

i=BarCount-1;
//i=SelectedValue(x);

Filter=1;

xBV=i-LastValue(LLVBars(L,3));
BV1=H[xBV];
BV2=H[i<xBV]>BV1;
BV=  H[i<xBV]>BV2;

//Analysis******************************

//Charts********************************
Plot(BV1,"BVsi",colorRed,styleDots);
Plot(BV2,"Bs2",colororange,styleDots);
Plot(BV,"BV",colorgreen,styleDots);

Plot(xBV,"xBV",colorBlue,styledots,1.2);
_SECTION_END();
``````

Sorry!

Building the Guppy countback line Entry:

1. Locate H at LLV(L,3) :BV1

2. Find next higher H to the left (a preceding bar): BV2

3.Find next higher (3rd instance) to left of BV2: BV

The code gives BV1 correctly. The problem is BV2 and BV, which produce 0 or 1 in Analysis.

No syntax errors; code seems logical. The issue may be in the use of < operator in subscript. Your help is greatly appreciated.

Code:

_section_begin("BV_Enter");

i=BarCount-1;

//i=SelectedValue(x);

Filter=1;

_section_begin("BV_Enter");

i=BarCount-1;

//i=SelectedValue(x);

Filter=1;

xBV1=LastValue(i-LLVBars(L,3));

BV1=H[i-xBV1];

//BV2=HighestSince(H>BV1,H[i<xBV1],1); Also tried this**********

BV2=lastvalue(H[i<BV1]>BV1);

BV= lastvalue(H[i<xBV1]>BV2);

//Analysis******************************