18 July 2011

Projection Oscillator for AmiBroker for Amibroker (AFL)

Developed by Mel Widner, Ph.D., the Projection Oscillator is a by-product of his Projection Bands (see Projection Bands). The Projection Oscillator is basically a slope-adjusted Stochastic. Where the Stochastic Oscillator (see Stochastic Oscillator) shows the relationship of the current price to its minimum and maximum prices over a recent time period, the Projection Oscillator shows the same thing, but the minimum and maximum prices are adjusted up/down by the slope of the prices regression line. This adjustment makes the Projection Oscillator more responsive to short-term price moves than an equi-period Stochastic.

Put another way, the Projection Oscillator shows where the current priceis relative to the Projection bands. A value of 50 indicates that thecurrent price is exactly in the middle of the bands. A value of 100indicates that prices are touching the top band. A value of 0 indicatesthat prices are touching the bottom band.


The Projection Oscillator can be used as both a short- and intermediate-term trading oscillator depending on the number of time periods used when calculating the oscillator. When displaying a short-term Projection Oscillator(e.g., 10-20 days), it is popular to use a 3-day trigger line.
There are several ways to interpret a Projection Oscillator.

Overbought/oversold. Buy when the oscillator falls below a specific level (e.g., 20) and then rises above that level, and sell when the Oscillator rises above a specific level (e.g., 80) and then falls below that level. High values (i.e., above 80) indicate excessive optimism. Low values (i.e., below 20) indicate excessive pessimism.

However, before basing any trade off of strict overbought/oversold levels, you should first qualify the trendiness of the market using indicators such as r-squared (see r-squared) or CMO (see Chande Momentum Oscillator). If these indicators suggest a non-trending market, then trades based on strict overbought/oversold levels should produce the best results. If a trending market is suggested, then you can use the oscillator to enter trades in the direction of the trend.

Crossovers. Buy when the oscillator crosses above its trigger (dotted) line and sell when the oscillator crosses below its trigger line. You may want to qualify your trades by requiring that the crossovers occur above the 70 level or below the 30 level.

Divergences. You may consider selling if prices are making a series of new highs and the oscillator is failing to surpass its previous highs. You may consider buying if prices are making a series of new lows and the oscillator is failing to surpass its previous low. You may qualify your trades by requiring that the divergence occur above the 70 level orbelow the 30 level.

pp = Param(" Period", 14, 1, 150, 1);
xx= Cum(1)*Cum(1);
Max( Ref(High,-1) + 1 * SHIGH,
Max( Ref(High,-2) + 2 * SHIGH,
Max( Ref(High,-3) + 3 * SHIGH,
Max( Ref(High,-4) + 4 * SHIGH,
Max( Ref(High,-5) + 5 * SHIGH,
Max( Ref(High,-6) + 6 * SHIGH,
Max( Ref(High,-7) + 7 * SHIGH,
Max( Ref(High,-8) + 8 * SHIGH ,
Max( Ref(High,-9) + 9 * SHIGH,
Max( Ref(High,-10) + 10 * SHIGH,
Max( Ref(High,-11) + 11 * SHIGH,
Max( Ref(High,-12) + 12 * SHIGH,
Ref(High,-13) + 13 *SHIGH)))))))))))));
Min( Ref(Low,-1) + 1 * SLOW,
Min( Ref(Low,-2) + 2 * SLOW,
Min( Ref(Low,-3) + 3 * SLOW,
Min( Ref(Low,-4) + 4 * SLOW,
Min( Ref(Low,-5) + 5 * SLOW,
Min( Ref(Low,-6) + 6 * SLOW ,
Min( Ref(Low,-7) + 7 * SLOW,
Min( Ref(Low,-8) + 8 * SLOW,
Min( Ref(Low,-9) + 9 * SLOW,
Min( Ref(Low,-10) + 10 * SLOW,
Min( Ref(Low,-11) + 11 * SLOW,
Min( Ref(Low,-12) + 12 * SLOW,
Ref(Low,-13) + 13 * SLOW)))))))))))));

No comments:

My Blog List

Total Pageviews

Search This Blog


Blog Archive