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: Rick Slemmer who wrote (5152)7/3/1998 11:34:00 PM
From: TechTrader42  Read Replies (1) of 11149
 
You can do that in QP2 with the "for loop." Here's an example:

output="test.lst";
input="portfoli.lst";
integer j, k;
k:=0;
for j=-9 to 0 step 1 do
if close(j)>close(j-1) then
k:= 1 + k;
println symbol , "," , k:3:0, ", ", date(j);
endif;
next j;

This gives the number of times (k) that a condition has been met on a certain date [date(j)} for a specified period (-0). You can do it for any condition, of course (and in any condition -- I did it only half sober).

Brooke
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext