In addition to what @Cougar said, if you are trying to get the Low price of a particular condition (which looks like you are trying to get the Low price from 'bo2probable' ??? then use 'ValueWhen' to return the Low price rather than the BarIndex().
First. I am finding the recent candle which satisfy the condition abs((Open-Close)/(High-Low)) > 0.5. I get the BarIndex meeting the criteria. ( That is bo1probable)
Secondly, I am trying to find the candle prior to the first identified candle meeting the above condition. (2nd recent) . I get the BarIndex meeting the criteria. ( That is bo2probable)
Third, I want to get the Low Values from either candles and check if the low of the candle identified first is not breached by any candles between first and the second on the lower side. I use the Valuewhen to find the low of the candles identified in Step 1 and 2.
BI = BarIndex();
// First. I am finding the recent candle which satisfy the condition abs((Open-Close)/(High-Low)) > 0.5
Cond = abs( ( O - C ) / ( H - L ) ) > 0.5;
// I get the BarIndex meeting the criteria
CondThisBI = ValueWhen( Cond, BI );
// Secondly, I am trying to find the candle prior to the first identified candle meeting the above condition. (2nd recent) . I get the BarIndex meeting the criteria
CondPrevBI = ValueWhen( Cond, BI, 2 );
// Third, I want to get the Low Values from either candles
CondThisBiLow = ValueWhen( Cond, L ); CondPrevBiLow = ValueWhen( Cond, L, 2 );
// and check if the low of the candle identified first is not breached by any candles between first and the second on the lower side
LwstLowSncePrevCond = LowestSince( Cond, L, 2 ); CondThisBiLowChkr = CondThisBiLow <= LwstLowSncePrevCond;
Filter = 1;
AddColumn( BI, "BI", 1.0 );
AddColumn( L, "Low", 1.2 );
AddColumn( Cond, "Cond", 1.0 );
AddColumn( CondThisBI, "Cond ThisBI", 1.0 ); AddColumn( CondPrevBI, "Cond PreviousBI", 1.0 );
AddColumn( CondThisBiLow, "Cond ThisBi Low", 1.2 ); AddColumn( CondPrevBiLow, "Cond PrevBi Low", 1.2 );
AddColumn( LwstLowSncePrevCond, "Lowest Low since prev Cond", 1.2 ); AddColumn( CondThisBiLowChkr, "Cond ThisBi LowChkr", 1.0 );