Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Adaptive Price Channel for Amibroker (AFL)
claux
over 13 years ago
Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:
amibroker, channel

This indicator reflects the prices trend within a channel formed by two adaptive moving averages.

Screenshots

Similar Indicators / Formulas

ATR Breakouts
Submitted by kamalcharan over 10 years ago
Donchian Channels
Submitted by rythm.arora almost 14 years ago
64 channel
Submitted by octobpra almost 14 years ago
Wilson Relative Price Channel
Submitted by kaiji almost 15 years ago
Pairs Ratio Plot
Submitted by aucn over 14 years ago
Square of Nine Roadmap Charts
Submitted by kaiji over 14 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN( "Adaptive price channel" );
//Adaptive Price Channel
Plot( C, "", colorBlack, styleCandle );
Lookback = 20;
MaxLookback = Param( "Max Lookback period",
                     40, 20, 60, 5 );
MinLookback = Param( "Min Lookback period",
                     20, 10, 20, 5 );
Vol = StDev( C, 30 );
Change = ( Vol - Ref( Vol, -1 ) ) / Ref( Vol, -1 );
StartBar = BeginValue( BarIndex() ); ;
FinishBar = EndValue( BarIndex() );
i = StartBar;

for ( i = StartBar + 31; i < Finishbar; i++ )
{
    Lookback[I] = round( Lookback[I-1] * ( 1 + Change[I] ) );

    if ( Lookback[I] > MaxLookback )
    {
        Lookback[I] = MaxLookback;
    }

    if ( Lookback[I] < MinLookback )
    {
        Lookback[I] = MinLookback;
    }
}

HighChannel = Ref( HHV( H, Lookback ), - 1 );
LowChannel = Ref( LLV( L, Lookback ), -1 );
Plot( HighChannel, "", colorBlue, styleDots |
      styleNoRescale | styleNoLine );
Plot( LowChannel, "", colorRed, styleDots |
      styleNoRescale | styleNoLine );
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.

Back