Skip to main content

The Relative Slope Pivots for Amibroker (AFL)

kaiji over 16 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 4)
  • Tags:

“RS up pivot” (RSUP) is the population of stocks presenting a bearish turning point (bearish pivot) over a certain (positive) level of their Relative Slope value. “RS down pivot” (RSDP) is the population of stocks presenting a bullish turning point (bullish pivot) below a certain (negative) level of their Relative Slope value. The two levels are predetermined and estimated by the Technical Analyst, as the levels where the majority of stocks obtained their maximum (respectively minimum) Relative slope value. Observation indicates that an 80% of this level performs well. In the following code, conditions RS>2 and RS<-2 are used respectively. They may be modified according to market profile.

This indicator will only plot if you run a scan with it on a list of stocks like the ASX200 or SP500.

By Dimitris Tsokakis

Screenshots

Indicator / Formula

Copy & Paste Friendly
/*RSPIVOTS*/
K = EMA((H + L + C) / 3, 10);
S1 = 2 *(K - Ref(K,  -1)) / (K + Ref(K,  -1));
RS = 100 * EMA(S1, 3);
s3 = RS < Ref(RS,  -1) AND Ref(RS,  -1) > Ref(RS,  -2) AND RS > 2;
s4 = RS > Ref(RS,  -1) AND Ref(RS,  -1) < Ref(RS,  -2) AND RS <  -2;
values9 = s3 > 0;
values10 = s4 > 0;

AddToComposite(Values9, "~rsuppivot", "V");
AddToComposite(Values10, "~rsdownpivot", "V");
Buy = 0;

/*Graph of ~rsuppivot and ~rsdownpivot*/
Graph0 = Foreign("~rsuppivot", "V");
Graph0Color = 5;
Graph1 = Foreign("~rsdownpivot", "V");
Graph1Color = 6;

Title = "BEARISH PIVOTS = " + WriteVal(LastValue(Foreign("~rsuppivot", "V"))) + 
" , BULLISH PIVOTS = " + WriteVal(LastValue(Foreign("~rsdownpivot", "V")));

0 comments

Leave Comment

Please login here to leave a comment.