SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Howard R. Hansen who wrote (9890)8/22/1999 10:48:00 PM
From: MrBuzz  Read Replies (1) of 11149
 
Thank you Howard.

DaysLoaded needs DaysRequired also.

For the MACD, ADX, etc indicators, I dont know what the minimum number of periods are needed to get the job done. But I have used 100 as a default.

The following is a example that should help when it comes to this regard - especially when you want to get IPO stocks or ones who have recently been added to the database.

-------------------------------------------------------
DaysToLoad = 100; // set to the min # of periods needed in
// your analysis
DaysRequired=1; // at least one to get IPOs
// DaysLoaded requires this to be set

if daysLoaded > 0 then
// do all basic analysis here
print Symbol;
print ",";
print Description;
print ",";
print IndustryGroup;
print ",";
print IndustrySector;
print ",";
print close(0);
print ",";
print Vol(0);
print ",";
print InstHold;
print ",";
print beta;

// etc.
endif;

if daysLoaded > 10 then
// do all 1 to 10 day analysis here
print AvgVol(0, -9);
print ",";
endif;

if daysLoaded > 100 then
// do all 1 to 100 day analysis here
print MACD(0):8:0;
print ",";
print ADX(0):8:0;

// etc
endif;

println;

If you dont section your code off this way, QP will toss out the symbol entirely if there are not enough data points available by default. This way, you can still obtain data for what is available.

Thanks for you help.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext