- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: rearadmiral16 <wag.tail [at] ntlworld [dot] com> To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com> Date: Tuesday, August 1, 2006, 2:02:19 PM Subject: [EquisMetaStock Group] Counting excessive open/close differences =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Could someone spare a few moments to point me in the right direction on an open/close difference indicator? What I'm trying to do is count the number of incidents in the last 20 days that an equity has opened more than 1% away from the previous day's close. Do I have to hard code each day for the last 20 days or is there a way of looping thru' the last 20 days? Cheers =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: Jose Silva <josesilva22 [at] yahoo [dot] com> To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com> Date: Wednesday, August 2, 2006, 2:13:25 PM Subject: [EquisMetaStock Group] Re: Counting excessive open/close differences =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= I would try something like this MS indicator: |
|
Gap Bar Counter { Open to (prev) Close gap bar counter v1.0 CCopyright 2006 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. http://www.metastocktools.com } { User inputs } minGap:=Input("Minimum gap %",0,50,1); pds:=Input("gap count Periods",1,2520,20); type:=Input("[1]GapUps, [2]GapDowns, [3]Both",1,3,3); plot:=Input("plot Gap [1]Count, [2]%count, [3]%change",1,3,1); { Gap % change } changePer:=(O/Ref(C,-1)-1)*100; { Gap Up/Down signals } gapUpSignal:=changePer>minGap; gapDwSignal:=changePer<-minGap; gapType:=If(type=1,gapUpSignal, If(type=2,gapDwSignal,gapUpSignal+gapDwSignal)); { Gap Up/Down signal count, count avg, %, %avg } count:=Sum(gapType,pds); countAvg:=Cum(count)/Cum(IsDefined(count)); countPer:=count/pds*100; countPerAvg:=Cum(countPer)/Cum(IsDefined(countPer)); { Plot in own window } If(plot=1,countAvg,If(plot=2,countPerAvg,minGap)); If(plot=1,countAvg,If(plot=2,countPerAvg,-minGap)); If(plot=1,count,If(plot=2,countPer,changePer)) |
jose '-) http://www.metastocktools.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: wag.tail [at] ntlworld.com <wag.tail [at] ntlworld [dot] com> To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com> Date: Thursday, August 3, 2006, 11:29:04 AM Subject: [EquisMetaStock Group] Re: Counting excessive open/close differences =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Streuth Jose, I've just got your msg., now that's a thorough answer! I do like the idea of input boxes as they obviously give you more flexibility but I've yet to get in the habit of using them. Certainly like the extra detail it gives in showing the % difference of the gap when using option 3. Thanx again RA. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From: Jose Silva <josesilva22 [at] yahoo [dot] com> To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com> Date: Thursday, August 3, 2006, 2:05:59 PM Subject: [EquisMetaStock Group] Re: Counting excessive open/close differences =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Yes, I was hoping that you'd see the usefulness of option 3, RD. It gives the complete raw picture, rather than specific details. jose '-) http://www.metastocktools.com | |
| |
Source / From: |