DEAR, ALL
I am trying to code this SMC concept called BISI- buy side imbalanced sellside inefficiency
For this to implement I have tried the code below --
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
// FVG- FAIR VALUE GAP
//==================================================================================================================================================================
// BISI - BUYSIDE IMBALANCE -SELL SIDE INEFICIENCY===>> [ ONLY BUY SIDE OFFERED ]
//==================================================================================================================================================================
// THREE CANDLE PATTERN
// CURRENT, REF (CURRENT ,-1),REF(CURRENT,-2)
// LAST 2 CANDLES ARE GREEN , FIRST CANDLE COULD BE GREEN OR RED
// GAP BW 1ST CANDLE HIGH AND AND 3RD CANDLE LOW IS GAP
FcHigh = Ref(H,-2);
LastCandLow = Low;
SecondCisGreen = Ref(C,-1) > Ref(O,-1);
SecondCishigher = Ref(C,-1) > Ref(H,-2);
ThirdCisgreen = C > O ;
ThirdLowIshigher = L > Ref(H,-2);
BISIisComplete = SecondCisGreen AND SecondCishigher AND ThirdCisgreen AND ThirdLowIshigher ;
BISIzoneUper = ValueWhen(BISIisComplete,L);
BISIzoneLower = ValueWhen(BISIisComplete,Ref(H,-2));
BISIzoneUper = IIf(BISIisComplete,Null,BISIzoneUper);
BISIzoneLower = IIf(BISIisComplete,Null,BISIzoneLower);
Plot(BISIzoneUper,"bisi up ",colorRed,styleLine);
Plot(BISIzoneLower,"bisi dn ",colorRed,styleLine);
In output some random Gaps are Missed .
Here is the Output -
Can anyone Please spot my mistake ,and Hint me to correct it .