Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

KelvinHand

Members
  • Content Count

    6
  • Joined

  • Last visited

Personal Information

  • First Name
    TradersLaboratory.com
  • Last Name
    User
  • City
    Singapore
  • Country
    Singapore
  • Gender
    Male

Trading Information

  • Vendor
    No
  1. Hi Derek, Found Reference to http://www.traderslaboratory.com/forums/trading-indicators/7319-ew-oscillator-breaking-bands.html and corrected as follows _SECTION_BEGIN("EW Oscillator Breaking Bands"); /*** Reference to Picture in: http://www.traderslaboratory.com/forums/trading-indicators/7319-ew-oscillator-breaking-bands.html --Converted by Kelvinhand -- ***/ K=1; K2=0.0555; Len=5; //-- MP = (H+L)/2; Price1 =ma(MP,5) - ma(MP,35) ; AvgP = ema(Price1,Len); clr = IIf(AvgP > 0, colorrgb(183,179,142), IIf(AvgP < 0, colorrgb(110,136,177), colorGrey50)); Plot(AvgP, "AvgP", clr, styleNoLabel|styleHistogram|styleThick); clr = IIf(Price1 > 0, colorYellow, IIf(Price1 < 0, colorBlue, colorGrey50)); Plot(Price1, "Osc535", clr, styleNoLabel|styleHistogram|styleThick); for(i=0; i<40; i++) UpperBand[i] =LowerBand[i]= Price1[i]; for(i=40; i<BarCount; i++) { if (Price1[i]>0) { UpperBand[i] = UpperBand[i-1]+ K2*(K*Price1[i] - UpperBand[i-1]); LowerBand[i] = LowerBand[i-1]; } else { UpperBand[i] = UpperBand[i-1]; LowerBand[i] = LowerBand[i-1]+ K2*(K*Price1[i] - LowerBand[i-1]); } } Plot(UpperBand, "upper", colorWhite, styleNoLabel); Plot(LowerBand, "lower", colorWhite, styleNolabel); PlotGrid(0, colorWhite ); _SECTION_END(); Attached Picture of the indicator in Amibroker:
  2. //**** Created by Kelvinhand **** a = HHV(H, 20); b = LLV(L, 10); Plot(a, "", colorYellow); Plot(b, "", colorYellow); aa= Cross(H,Ref(a, -1)); bb= Cross(L,ref(b, -1)); aaa = BarsSince(aa); bbb = BarsSince(bb); clr = IIf(aaa<bbb, colorGreen, colorOrange); SetBarFillColor( clr); Plot( C, "", clr, styleCandle);
  3. Here is my conversion from MT4 to Amibroker. Download Advanced Get Oscillator For Amibroker (AFL) Similar to "elliott-wave-oscillator-breaking-band" here except K1, K2; Modified as follow: _SECTION_BEGIN("elliott-wave-oscillator-breaking-band"); K=1; K2=0.0555; Len=5; MP = (H+L)/2; Price1 =ma(MP,5) - ma(MP,35) ; AvgP = ema(Price1,Len); clr = IIf(Price1 > 0, colorYellow, IIf(Price1 < 0, colorBlue, colorGrey50)); Plot(Price1, "Osc535", clr, styleNoLabel|styleHistogram); clr = IIf(AvgP > 0, colorrgb(183,179,142), IIf(AvgP < 0, colorrgb(110,136,177), colorGrey50)); Plot(AvgP, "AvgP", clr, styleNoLabel); //-- Kelvinhand -- for(i=0; i<40; i++) UpperBand[i] =LowerBand[i]= Price1[i]; for(i=40; i<BarCount; i++) { if (Price1[i]>0) { UpperBand[i] = UpperBand[i-1]+ K2*(K*Price1[i] - UpperBand[i-1]); LowerBand[i] = LowerBand[i-1]; } else { UpperBand[i] = UpperBand[i-1]; LowerBand[i] = LowerBand[i-1]+ K2*(K*Price1[i] - LowerBand[i-1]); } } Plot(UpperBand, "upper", colorOrange, styleNolabel); Plot(LowerBand, "lower", colorOrange, styleNolabel); PlotGrid(0, colorWhite ); _SECTION_END();
  4. Please give a proper code, not a buged code, expect people to help you. The distortions is very easy - add a style no rescale.
  5. This is not easy language, it is amibroker script language
  6. This is not Easy Language, sure got compilation errors. This is called from Amibroker.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.