Hi Experts,
I have intraday ORB trading system of my desired time frame on chart . But smaller time frame like 1 min and 5 min giving me more buy and sell signals (not repeated) like if my first condition buy or sell giving signal and next after reversal giving signal like that every time that giving signal. I want to retrict signals daily my desired numbers: I am posting my code please suggest me how to add the other lines as my required thing.
_SECTION_BEGIN("ORB");
SetChartOptions(0,chartShowArrows|chartShowDates);
F=Param("Filter for ORB",0,0,100,0.05);
T =Param("Target in Points ",1,0,100,0.05);
_N(Ta=ParamList(" Target Line ","SHOW|HIDE"));
_N(BL=ParamList(" Bre.Out Line ","SHOW|HIDE"));
BOTS =ParamTime("Bre.OutStartTime","09:15:00",0);
BOTE=ParamTime("Bre.OutEndTime","09:15:00",0);
TCT = ParamTime("Trade Close Time","15:15:00",0);
dec = (Param("Decimals",2,0,7,1)/10)+1;
SetChartBkColor(ParamColor("Outer panel",colorBlack));
SetChartBkGradientFill(ParamColor("Inner panel upper",colorBlack),ParamColor("Inner panel lower",colorBlack));
NewDay = Day()!= Ref(Day(), -1);
EndDay = (Day()!= Ref(Day(), 1));
Breakoutstart=TimeNum()>BOTS-100 AND TimeNum()<=BOTS;
BreakoutEnd=TimeNum()>BOTE-100 AND TimeNum()<=BOTE;
TradeCloseTime = TimeNum()>TCT-100 AND TimeNum()<=TCT;
ORBHigh = ValueWhen(TimeNum()<=BOTE,HighestSince(BreakoutStart,H));
ORBLow = ValueWhen(TimeNum()<=BOTE,LowestSince(Breakoutstart,L));
ABHIGH = ValueWhen(TimeNum()<=TCT ,HighestSince(BreakoutEnd,H));
ABLOW = ValueWhen(TimeNum()<=TCT,LowestSince(BreakoutEnd,L));
Range = ORBHigh-ORBLow;
BuyFirst= ORBHigh+F;
SellFirst=ORBLow-F;
Range1 = BuyFirst-SellFirst;
DayHigh = TimeFrameGetPrice("H",inDaily);
DayLow = TimeFrameGetPrice("L", inDaily);
Buycond = H >BuyFirst;
Sellcond= L <SellFirst;
Buy = Buycond AND TimeNum()>BOTE AND TimeNum()<TCT;
Short= Sellcond AND TimeNum()>BOTE AND TimeNum()<TCT;
Cover = Buy OR TimeNum()==TCT;
Sell = Short OR TimeNum()==TCT;
Buy = ExRem(Buy,Sell);
Sell= ExRem(Sell,Buy);
Short= ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
Bp = BuyFirst;
Sp = SellFirst;
BuyTar1 = Bp+Range;
Selltar1=Sp-Range;
Buy = Buy;
Short = Short;
Sell = H>BuyTar1 OR Sell ;
Cover= L<SellTar1 OR Cover;
Buy = ExRem(Buy,Sell);
Sell= ExRem(Sell,Buy);
Short= ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-20);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-30);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-25);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorRed, 0, H, Offset=20);
PlotShapes(IIf(Short, shapeSquare, shapeNone),colorOrange, 0,H, Offset=30);
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-25);
//PlotShapes(IIf(Sell1, shapeSquare, shapeNone),colorGreen, 0, H, Offset=40);
//PlotShapes(IIf(Sell1, shapeSquare, shapeNone),colorLime, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeStar, shapeNone),colorWhite, 0,H, Offset=45);
//PlotShapes(IIf(Cover1, shapeSquare, shapeNone),colorRed, 0, L, Offset=-55);
//PlotShapes(IIf(Cover1, shapeSquare, shapeNone),colorOrange, 0,L, Offset=-65);
PlotShapes(IIf(Cover, shapeStar, shapeNone),colorWhite, 0,L, Offset=-60);
TrendColor = IIf(TimeNum()<=BOTE,colorPaleBlue,IIf(TimeNum()>TCT,colorPaleBlue,IIf(C>BuyFirst,colorBrightGreen, IIf(C<SellFirst ,colorRed,IIf(H>=BuyFirst AND L<=SellFirst ,colorGold,colorWhite)))));
SetBarFillColor(TrendColor);
Plot(C,"",TrendColor,styleCandle);
Plot(TradeCloseTime,"",colorWhite,styleHistogram|styleOwnScale);
if(Ta=="SHOW")
{
Plot(BuyTar1,"",colorLime,styleDashed);
Plot(SellTar1,"",colorRed,styleDashed);
}
else
{
}
if(BL=="SHOW")
{
Plot(BuyFirst,"",colorLime,styleThick);
Plot(SellFirst,"",colorRed,styleThick);
}
else
{
}