Skip to main content

Pivot Based RSI for Amibroker (AFL)

pras about 16 years ago Amibroker (AFL)

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

In “The Pivot Detector Oscillator, Simplified” in the July 2009 S&C, Giorgos Siligardos presents a simple Rsi-based oscillator. Coding such an indicator is very straightforward. A ready-to-use formula for the article is presented here. To use it, enter the formula in the Afl Editor, then select “Insert indicator”. The same formula can be also used in an automatic analysis to perform backtesting.

Note: The signals plotted by this on a chart look pretty rare.

Indicator / Formula

Copy & Paste Friendly
function PIDosc()
{
    sma200 = MA(C, 200);
    bull = C > sma200;
    return IIf(bull, (RSI(14) - 35) / (85-35), (RSI(14) - 20) / (70-20)) *100;
}

pid = PIDOsc();

Buy = Cross(pid, 0);
Sell = Cross(100, pid);

Plot(C, "Price", colorBlack, styleBar);

PlotShapes(Buy *shapeUpArrow, colorBlue);
PlotShapes(Sell *shapeDownArrow, colorRed);

0 comments

Leave Comment

Please login here to leave a comment.