Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Adaptive Price Channel for Amibroker (AFL)
This indicator reflects the prices trend within a channel formed by two adaptive moving averages.
Screenshots
Similar Indicators / Formulas
Indicator / Formula
_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