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

Clear Method for Amibroker (AFL)

Rating:
3 / 5 (Votes 5)
Tags:
amibroker, stop loss

This indicator from TASC September 2010.It is indicate price movement in short term.

Similar Indicators / Formulas

NRTR WATR
Submitted by allexiss almost 13 years ago
DODA BAND BUY SELL
Submitted by saas almost 11 years ago
JMA Stoploss
Submitted by kuzukapama almost 13 years ago
TSL & HL & New
Submitted by morgen almost 12 years ago
Stop Loss Indicator
Submitted by nabcha about 14 years ago
ABKP Benchmark Bar
Submitted by amitabh about 14 years ago

Indicator / Formula

Copy & Paste Friendly
//from TASC September 2010
upsw = 0; 
Hh = Lh = H[ 0 ]; 
Hl = Ll = L[ 0 ]; 

for( i = 0; i < BarCount; i++ ) 
{ 
  Ch = H[ i ]; 
  Cl = L[ i ]; 

  if( upsw == 1 ) 
  { 
    Hh = Max( Ch, Hh ); 
    hL = Max( Cl, Hl ); 
     
    if( Ch < Hl ) 
    { 
      upsw = 0; 
      Ll = Cl; 
      Lh = Ch; 
    } 
  } 
   
  if( upsw == 0 ) 
  { 
    Ll = Min( Cl, Ll ); 
    Lh = Min( Ch, Lh ); 

    if( Cl > Lh ) 
    { 
      upsw = 1; 
      Hh = Ch; 
      Hl = Cl; 
    } 
  } 

  Hla[ i ] = Hl; 
  Lha[ i ] = Lh; 
  upswa[ i ] = upsw; 
} 
   
Plot( IIf( upswa == 1, Hla, Null ), "SwLine", ColorRGB( 64, 128, 128), styleThick ); 
Plot( IIf( upswa == 0, Lha, Null ), "SwLine", ColorRGB( 128, 64, 128), styleThick  ); 

Plot( C, "Price", IIf( upswa == 1, 
      ColorBlend( colorGreen, colorWhite ), 
      ColorBlend( colorRed, colorWhite )), styleBar); 

6 comments

1. gopal

Duplicate. This already exists in this site

2. kirthi1987

got error my amibrokerversionis 5.20 got erorr @ Plot( C, “Price”, IIf( upswa == 1,
ColorBlend( colorGreen, colorWhite ),
ColorBlend( colorRed, colorWhite )), styleBar);
athis lines pls slove

3. siddhisagar

yes, even i get the same error. tried fixing the problem but didnt work

4. Rakesh Kumar

Working fine for me.

5. morgen

This is something special!

6. ahmedalhoseny

Error 31
syntax error expected ) or , !!!!!!!

Leave Comment

Please login here to leave a comment.

Back