How do i add buy signal if high price crosses the high

I have a AFL where i want to take the breakout of the LongSignal as long as the price has not gone below the low of the buysignal day.
I dont know how to do it. Any ideas?

_N( Title = StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " + WriteVal( V, 1.0 ) + " {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );
//https://www.raoufx.com/trading%20with%20ichimoku%20clouds%20the%20essential%20guide%20to%20ichimoku%20kinko%20hyo%20technical%20analysis.pdf
Plot( C, "Close", colorDefault, styleNoTitle | GetPriceStyle() );
_SECTION_BEGIN("Tenkan-Sen");
TenkanPer = Param("Tenkan-Sen Period",9,1,100,1);
TenkanCol = ParamColor("Tenkan-Sen Color",colorRed);
TenkanSty = ParamStyle("Tenkan-Sen Style",styleLine | styleThick);
Tenkan = ( HHV(H,TenkanPer) + LLV(L,TenkanPer) ) / 2;
Plot(Tenkan,"Tenkan",TenkanCol,TenkanSty);
_SECTION_END();
 
_SECTION_BEGIN("Kijun-Sen");
KijunPer = Param("Kijun-Sen Period",22,1,100,1); // using 22 instead of 26 as there are only 22 trading days in a month.
KijunCol = ParamColor("Kijun-Sen Color",colorBlue);
KijunSty = ParamStyle("Kijun-Sen Style",styleLine | styleThick);
Kijun = ( HHV(H,KijunPer) + LLV(L,KijunPer) ) / 2;
Plot(Kijun,"Kijun",KijunCol,KijunSty);
_SECTION_END();
 
_SECTION_BEGIN("Chikou Span");
ChikouShft = Param("Chikou Span Shift",22,1,100,1); // using 22 instead of 26 as there are only 22 trading days in a month.
ChikouCol = ParamColor("Chikou Span Color",colorViolet);
ChikouSty = ParamStyle("Chikou Span Style",styleLine | styleNoLabel);
Chikou = C;
Plot(Chikou,"",ChikouCol,ChikouSty,Null,Null,-ChikouShft);
_SECTION_END();
 
_SECTION_BEGIN("Senkou-Kumo");
SenkouKumoShft = Param("Senkou-Kumo Shift",21,0,100,1);
_SECTION_END();
 
_SECTION_BEGIN("Senkou Span A");
SenkouACol = ParamColor("Senkou Span A Color",colorSeaGreen);
SenkouASty = ParamStyle("Senkou Span A Style",styleLine);
SenkouA = ( Tenkan + Kijun ) / 2;
Plot(SenkouA,"Senkou A",SenkouACol,SenkouASty,Null,Null,SenkouKumoShft) ;
_SECTION_END();
 
_SECTION_BEGIN("Senkou Span B");
SenkouBPer = Param("Senkou Span B Period",42,1,200,1);
SenkouBCol = ParamColor("Senkou Span B Color",colorPink);
SenkouBSty = ParamStyle("Senkou Span B Style",styleLine);
SenkouB = ( HHV(H,SenkouBPer) + LLV(L,SenkouBPer) ) / 2;
Plot(SenkouB,"Senkou B",SenkouBCol,SenkouBSty,Null,Null,SenkouKumoShft) ;
_SECTION_END();
 
_SECTION_BEGIN("Kumo");
KumoUpCol = ParamColor("Kumo UP Color",colorSeaGreen);
KumoDnCol = ParamColor("Kumo DN Color",colorPink);
PlotOHLC(SenkouA,SenkouA,SenkouB,SenkouB,"",IIf(SenkouA>SenkouB,KumoUpCol,KumoDnCol),styleCloud | styleNoLabel,Null,Null,SenkouKumoShft);
_SECTION_END();

RANGE = H - L;
hh7 = RANGE == HHV( RANGE, 7 );
PlotShapes( hh7*shapeDigit7, colorYellow, layer = 0, L + range / 2 );
LongSignal=MA(V,50)>400000 AND MA(C,15)>1 AND  MA(C,15)<40 AND hh7  AND V>MA(V,50)*2 AND Tenkan>Kijun AND BarsSince(Cross(Tenkan,Kijun))<3;
PlotShapes( LongSignal*shapeDigit2, colorPink, layer = 0, L- range / 4 );
// this is where i want to solve it.
// how do i add buy signal if high price crosses the high of the day of the LongSignal 
// cancel the signal if the low price crosses the low of teh day of the buysignal.

//Buy =LongSignal;//=h>ValueWhen(LongSignal,High,1);// AND //LowestSince(LongSignal,Low,1)>ValueWhen(LongSignal,Low,1);

//Filter=Buy;
//AddColumn(LongSignal,"LongSignal");
//AddColumn(C>ValueWhen(LongSignal,High,1) ,"buysignal");
//AddColumn(LowestSince(Ref(LongSignal,1),Low,1),"lowestlow");