Bob ... LOL! Re. template ... here 'tis. Hope it can be of help to anyone. Wish I'd done it a long time ago. Glad to be able to share something after all the generousity I've seen here over the years. Any improvement ideas welcome. Seems to work OK so I hope there are no bugs :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ output = "*****.lst";
//input="*****.lst";
// ~~~~~~~~~~~ Exchanges ~~~~~~~~~~~~~~~~~~~~~~ // Exchange = All; // use null to select or de-select exchanges. Exchange = NASDAQ; Exchange = NYSE; Exchange = AMEX; // Exchange = INDEXES; // Exchange = OPENEND; // Exchange = SPWEEKLY; // Exchange = IRLDAILY; // Exchange = IRLWEEKLY]
// ~~~~~~~~~~ Issue Types ~~~~~~~~~~~~~~~~~~~~~ // IssueType All; // use null to select or de-select issue types. IssueType Common; // IssueType Warrants; // IssueType ClosedEnd; // IssueType Preferred;
// ~~~~~~~~~~ data to deal with ~~~~~~~~~~~~~~~ DaysToLoad=250; // use null to activate or de-activate. DaysRequired=250; // change numbers as desired.
// ~~~~~~~~~~ variables declarations ~~~~~~~~~~ float i, j, k, l; integer x, y, a, b, c, d; string opts;
// ~~~~~~~~~~ general variables settings ~~~~~~ x := 0; // use x and y for the (x) and/or (y) day y := 0;
for x = -10 to 0 step 1 do // use null to activate or de-activate the "for loop"
// ~~~~~~~~~~~~~~ insert scan logic below at appropriate spot(s) ~~~~~~~~~~~~~~~~~~ opts := "N"; // initialize "options" flag
if HasOptions = true then // check for options and set flag if true. opts := "Y"; // null these 2 lines if not interested in options.
if AvgVol(x,x-29) > 150000 and // VOLUME FILTER vol(x) > 125000 and // refine to eliminate spike anomolies. vol(x-2) > 125000 and // modify to individual requirements. vol(x-4) > 125000 and vol(x-6) > 125000 and vol(x-10) > 125000 and
close(x) >= 10 then // PRICE FILTER
// sic != 0000 and // SIC CODE FILTER // sic != 0000 and // sic != 0000 and // use these SIC filters to exclude issues with // sic != 0000 then // selected SIC codes, if desired.
// for y = 24 to 0 step -1 do
// ~~~~~~~~~~~~~~ print lines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
print symbol:-7, ",";
print date(x), ","; // use this line only in conjunction with "for loop"
// print "Opts: ", opts:-1, ","; // select any of these print elements by // print "MC: ", marketcap:-5:0, ","; // "de-nulling" them. // print "BV: ", bookvalue:-3:1, ","; // print "RSI: ", rsi(0):-2:0, ","; // print "QRS: ", qrs(0):-2:0, ","; // print "BETA: ", beta:-1:1, ","; // print "Flt: ", sharesfloat:-4:0, ","; // remove the ', ","' from the last one, // print "SP: ", SPRating, ","; // leaving the semi-colon. // print "PE: ", pe:-3:0, ","; // print "Yld: ", yield:-2:0, ","; // these elements were included here as they // print "SIC: ", sic, ","; // are ones which are not visible on the chart
println;
// x := 0; // use if only one hit in for loop is desired
endif; endif; endif; // add "endif's" as needed based on scan logic inserted // next x;
// next y; |