Skip to main content

Opening Range for Amibroker (AFL)

vips26878 over 13 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 2)
  • Tags:
    trading system, amibroker

Hello Friends

I haver found this indicter on another site and make some modification for better result

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Opening range");
breakoutime = 100000;
afterbreakout0 = Cross(TimeNum(),100000);
afterbreakout1 = TimeNum()>=100000;
NewDay = Day()!= Ref(Day(), -1);
highestoftheday = HighestSince(newday,H,1);
Lowestoftheday =LowestSince(newday,L,1);
ORBHigh = ValueWhen(afterbreakout0,highestoftheday,1);
ORBLow = ValueWhen(afterbreakout0,lowestoftheday,1);
Buy= Cross(C,orbhigh) AND afterbreakout1;
Sell = Cross(orblow,C) AND afterbreakout1;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

Short=Cross(C,ORblow) AND afterbreakout1;
Cover=Cross(ORbhigh,C) AND afterbreakout1;

Plot(C,"",colorYellow,styleBar);
PlotShapes( shapeUpArrow * Buy, colorGreen,0,L,-12);
PlotShapes( shapeDownArrow * Sell, colorRed,0,H,-12);
Plot(afterbreakout0,"",colorBlue,styleHistogram|styleOwnScale);
Plot(ORBHigh,"",colorGreen,styleDots);
Plot(ORBLow,"",colorRed,styleDots);
_SECTION_END();

_SECTION_BEGIN("TSKPDynSupRes");
sw = E_TSKPSWINGLINE(High,Low,Close);
// tskp_sw, tskp_swmean,tskp_swupper,tskp_swlower
Plot( tskp_swmean, "Mean", ParamColor( "MeanColor", colorDarkGreen ), ParamStyle("MeanStyle",styleNoLabel) ); 
Plot( tskp_swupper, "Resistance", ParamColor( "ResistanceColor", colorDarkGreen ), ParamStyle("ResistanceStyle",styleNoLabel) ); 
Plot( tskp_swlower, "Support", ParamColor( "SupportColor", colorDarkGreen ), ParamStyle("SupportStyle",styleNoLabel) ); 
_SECTION_END();

4 comments

over 13 years ago

Try this.. this may solve ur Query

Formula :-

_SECTION_BEGIN("Opening range");
breakoutime = 100000;
afterbreakout0 = Cross(TimeNum(),100000);
afterbreakout1 = TimeNum()>=100000;
NewDay = Day()!= Ref(Day(), -1);
highestoftheday = HighestSince(newday,H,1);
Lowestoftheday =LowestSince(newday,L,1);
ORBHigh = ValueWhen(afterbreakout0,highestoftheday,1);
ORBLow = ValueWhen(afterbreakout0,lowestoftheday,1);
Buy= Cross(C,orbhigh) AND afterbreakout1;
Sell = Cross(orblow,C) AND afterbreakout1;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

Short=Cross(C,ORblow) AND afterbreakout1;
Cover=Cross(ORbhigh,C) AND afterbreakout1;

Plot(C,"",colorYellow,styleBar);
PlotShapes( shapeUpArrow * Buy, colorGreen,0,L,-12);
PlotShapes( shapeDownArrow * Sell, colorRed,0,H,-12);
Plot(afterbreakout0,"",colorBlue,styleHistogram|styleOwnScale);
Plot(ORBHigh,"",colorGreen,styleDots);
Plot(ORBLow,"",colorRed,styleDots);
_SECTION_END();

_SECTION_BEGIN("TSKPDynSupRes");

// tskp_sw, tskp_swmean,tskp_swupper,tskp_swlower

_SECTION_END();

over 13 years ago

Above opening range formula similiar to ORB System -

http://wisestocktrader.com/indicators/2396-orb-system

Leave Comment

Please login here to leave a comment.