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 : Metastock 6.0 for Window

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Paul Beattie who wrote (1775)3/27/1998 9:41:00 AM
From: bdog  Read Replies (1) of 4056
 
YO Paul! Helpful? Heck, I've been perusing the MS manual for some kind of do while for loop or something to get me a variable rising period for days! Ya know, using a counter and increasing -1 day, blah blah, blah. I started some long drawn out IF thing and just about to bag it when your post comes along...one line of code...sweet. NICE workaround.

I like memory variables too, as I type quite slow. This is what I was doing with a fixed period of rising. I put an m in front of variables for reference. (mp will get you in trouble though!)

mt1:= 25; {enter threshold}
mp1:= 13; {enter periods}
md1:= ADX(mp1); {enter indicator}{current day}
md2:= Ref(md1, -1); {day -1}
md3:= Ref(md1, -2); {day -2}
mrise:= mp1 > md2 AND md2 > md3;

md1 > mt1 AND mrise

I then utilized your ingenious "loop" and revised...

mt1:= 25; {enter threshold}
mp1:= 13; {enter periods}
md1:= ADX(mp1); {enter indicator}{current day}
mpr:= 3; {enter periods rising}

Sum(md1>md2,mpr)=mpr


Thank you.
I love sharp and smart people and SI is full of them. The TA vets have been very helpful. Just hope to someday contribute as well, for now I'm afraid it's mostly "barbie doll heads " (LOL, CatLady!)

bdog

ps Your note about when you first found these threads must be to Brooke or someone else as I was not around, maybe Jerry "big dog" Gatto?
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext