Skip to content

Instantly share code, notes, and snippets.

@marketcalls
Created January 7, 2017 07:17
Show Gist options
  • Save marketcalls/be5113390d90944c4ec77673a3abcb2b to your computer and use it in GitHub Desktop.
Save marketcalls/be5113390d90944c4ec77673a3abcb2b to your computer and use it in GitHub Desktop.
Simple Scanner.afl
_SECTION_BEGIN("Simple Scanner");
//Logical Filtering of Stocks
Filter = ROC(C,12)>4 AND ROC(C,12)<7 AND C>100;
//Track Status and Text Interpretation
ratestatus = WriteIf(ROC(C,12)>4 AND ROC(C,12)<5,"Lower ROC",WriteIf(ROC(C,12)<7,"Higher ROC","Medium ROC"));
ratecolor = IIf(ROC(C,12)>4 AND ROC(C,12)<5,colorGreen,IIf(ROC(C,12)<7,colorBlue,colorYellow));
//Plot Values
AddColumn(C,"Close",1.2);
AddColumn(RSI(14),"RSI-14",1.2);
AddColumn(ROC(C,1),"%Change",1.2);
AddColumn(ROC(C,12),"ROC",1.2,colorWhite,IIf(ROC(C,12)>5,colorGreen,colorRed));
//Plot Text Interpretation
AddTextColumn(ratestatus,"ROC Status",1,colorWhite,ratecolor);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment