_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", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

/* Intraday Open Range Breakout Exploration AFL by GMS

What's the open range breakout system ?

1. it identifies the highest price and lowest price reached since open upto the
Start Time,
2. Enter long when Price cross above ORBH (Open Range Breakout High) with a stop
loss at ORBL(open Range Breakout Low), once in trade adjust SL as per your risk
tollarence level.
3. Enter Short when Price cross below ORBL (open Range Breakout Low) with a stop
loss at ORBH((Open Range Breakout High),once in trade adjust SL as per your risk
tollarence level.

What is in this AFL?
1) Draws regular Candle chart
2) Set ORB Time as per param
3) Marks "ORB High" Green dotted line, "ORB Low" Red dottend line and additional
Black dotted line which is middle of ORBH & ORBL on chart
4) Possible to explore, Exploration results are sorted alphabatically and shows
following columns
Column 1 = Script
Column 2 = Date
Column 3 = ORBH - Open Range Breakout High value, Green means already triggered.
Column 4 = ORBL - Open Range Breakout Low value, Red Mean already triggered.
Column 5 = ORB High Breakout gain, that is maximum gain if entered long as per ORBH
Column 6 = ORB Low Breakout gain, that is maiimum gain if short as per ORBL

How to trade?

Once ORBH & ORBL are values are set as per param time, place 2 orders
1) BUY stop loss order if price crosses above ORBH price
2) SELL stop loss order if price crosses below ORBL price.

Please strictly trade with stop loss, ideally for long stop loss = ORBL & for short
stop loss = ORBH. Please feel free to adjust stop loss based on your risk
tollarence level.

*/

_SECTION_BEGIN("Intraday ORB Exploration");

SetChartOptions( 0, chartShowArrows | chartShowDates );
//("ORB");

BT = ParamTime ("Open Breakout Time", "10:15");
afterbreakout0 = Cross(TimeNum(),BT);
afterbreakout1 = TimeNum()>=BT;

colorLime. 0. GfxSelectSolidBrush( colorLightYellow ). SetSortColumns(1).1). CBuy = C >ORBH. GfxRoundRect( 20. highestoftheday = HighestSince(newday. 1. ORBL = ValueWhen(afterbreakout0. CSell= C <ORBL. IIf(Close>ORBM. Sp = ValueWhen(Sell.styleDots). 0. styleNoTitle | ParamStyle("Style") | GetPriceStyle() ).colorWhite.L.2. GfxSetBkMode(1). shapeNone). shapeSquare. Plot(ORBM. -1). ORBL2 = (ORBL-((ORBH-ORBL)/2)*2). L. IIf(Close>ORBH.NewDay = Day()!= Ref(Day().Sell).2.1).H. Offset=-40).styleDots).Buy). "ORB Low Breakout Gain".C. colorSeaGreen.H. colorDefault))). shapeSquare. Offset=50). 1. 1. Plot(ORBH. Offset=-50). AddColumn( ORBL. ParamColor("Color".L. colorDefault. colorGreen.C.colorGreen. IIf(Close<ORBL.-1). colorRed. "Close". colorDefault)). shapeNone). colorDefault. colorRed. ORBH1 = ORBH+(ORBH-ORBL)/2. . GfxTextOut("Buy Ety: " + WriteVal(Bp. CBuy1 = Ref(CBuy. True) . 30. "ORB High Breakout Gain". PlotShapes(IIf(Sell. 30. ORBHG=H-ORBH. PlotShapes(IIf(Sell.2.1). GfxTextOut("Buy SL: " + WriteVal(ORBH-((ORBH-ORBL)*80/100). colorGreen. Plot(ORBL. PlotShapes(IIf(Buy.40). "". Buy = ExRem(Buy.highestoftheday. H. colorDefault))). styleDots). 25. PlotShapes(IIf(Sell. colorOrange. CSell1 = Ref(CSell. AddColumn( ORBLG.colorRed. Lowestoftheday =LowestSince(newday. Offset=-45). colorDefault. 1.1). PlotShapes(IIf(Buy. colorDefault.lowestoftheday.H.colorGreen.colorRed. Sell = CSell. GfxSelectFont("Arial".colorWhite. PlotShapes(IIf(Buy.colorOrange. colorBlack.2. "C>ORBH".2. Filter = ORBH OR ORBL. ORBH = ValueWhen(afterbreakout0. "C<ORBL". 0. Sell= ExRem(Sell. ORBLG=ORBl-L. 0. GfxSelectPen( colorRed.800."".1. shapeUpArrow. ORBL1 = ORBL-(ORBH-ORBL)/2. shapeNone)."". shapeSquare. Offset=40). Bp = ValueWhen(Buy.2. shapeNone). AddColumn( ORBH. 3 ). IIf(ORBHG>0. 0.L.14. 0. shapeNone). ORBH2 = (ORBH+((ORBH-ORBL)/2)*2). colorBlack ).True). IIf (ORBLG>0. shapeSquare.1). Buy = CBuy. 140.-1).60). 15 ). shapeNone). AddColumn( ORBHG.False). 1. GfxSetTextColor(colorBlue). //Plot ( C. colorDefault)).1). Offset=-45). shapeDownArrow. 15.380. IIf(Close<ORBM. ORBM = (ORBH + ORBL)/2.

colorYellow) ).40).1. GfxTextOut("Sell Ety: " + WriteVal(Sp."Show|Hide".2.0). colorBrightGreen. //Magfied Market Price FS=Param("Font Size". 200. GfxSetTextColor( ParamColor("Color". GfxSetBkMode( colorWhite ). /*Plot MA*/ MAT = ParamToggle(" MAT". GfxSelectFont("Times New Roman".styleLine).830. _SECTION_BEGIN("Magfied Market Price"). Ver=Param("Vertical Position". "10 MA". Ver ).1200.styleLine).16.True).11.11. _SECTION_END().1).inDaily. 700.2).GfxSetTextColor(colorRed).1. 11. colorBlue. True ). colorOrange.2). 1.1. Status("pxheight")/40 ). Plot( MA( Close. "20 MA". GfxSetBkMode( colorBlack ). _SECTION_END(). } _SECTION_END().50).-1). GfxTextOut(Date() +"="+C.2. GfxTextOut("Sell SL: " + WriteVal( ORBL+((ORBH-ORBL)*80/100). True ). "200 MA". Plot( MA( Close.styleLine). DD=Prec(C-YC.10).colorYellow) ).1).styleLine). FS. 700.960. if(MAT==1) { Plot( MA( Close. 200. Hor=Param("Horizontal Position". xx=Prec((DD/YC)*100.1). True) . GfxSetTextColor(ParamColor("Color". GfxSelectFont("Tahoma".60). colorGold.100. Hor . Plot( MA( Close.200). _SECTION_BEGIN("ganesh ma"). GfxSelectFont("Times New Roman".20). YC=TimeFrameGetPrice("C". . "50 MA".