Skip to main content

Near All Time high for Amibroker (AFL)

pavanrajg about 10 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 2)
  • Tags:
    amibroker, exploration

Used to predict stocks near all time high

Indicator / Formula

Copy & Paste Friendly
a = hhv(close, 30);

b = ((a / close) - 1) * 100;

filter = b < 1.5; // Near all time highs

2 comments

about 10 years ago

The above is wrong….Use this one.

a = Highest(Close);
a1 = Highest(High);
 
b = ((a / Close) - 1) * 100;
 
Filter = b < 1.5; // Near all time highs

SetOption("NoDefaultColumns", True );
AddTextColumn(Name(),"Ticker",1.0,colorDefault,colorDefault,60);
AddColumn( DateTime(), "Date", formatDateTime,colorDefault,colorDefault,68 );
AddColumn( IIf(ROC( C, 1 ) >=0, ROC(C,1),IIf(ROC( C, 1 ) < 0,ROC(C,1),Null)) ,"%C",1.1,colorDarkGrey,IIf(ROC( C, 1 ) >=0,colorPaleGreen,IIf(ROC( C, 1 ) <0,colorPink,colorLightGrey)));
AddColumn(C , "Close ",1.2, colorBlack );
AddColumn(a , "HighClose" , 1.2 , colorBlue);
AddColumn(a-C , "Closediff" , 1.2 , colorBlue);
AddColumn(b , "B" , 1.2 , colorBlack);
AddColumn(a1 , "Highest" , 1.2 , colorRed);
SetSortColumns(7); 
_SECTION_END();
2. moccha
about 6 years ago

I think b should be

b = ((Close / a ) - 1) * 100;
 
Filter = abs(b) < 1.5; // Near all time highs

Leave Comment

Please login here to leave a comment.