logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
sztracyh  
#1 Posted : Thursday, July 20, 2006 12:57:31 PM(UTC)
sztracyh

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/20/2006(UTC)
Posts: 1

One condition of my explorer use 30-weeks moving average. However, this will result exclude stocks with less than 30-weeks data. So, I try to to alter the 30-weeks moving average with 12-weeks moving average for stocks with less than 30-weeks data, I use the following formulae: If(IsDefined(Mov(C,30,S))=1, mov(c,30,S),mov(c,12,S)) with this formulae, however, the stock with 12-30 weeks data is still being rejected - reason noted is "Period value out of Range in Mov() function". Can I get some help here, how can I get Explorer to do different set of function for stocks with less than 30-weeks data instead of rejecting them? Thank hips for any hints in advance! Tracy Huang
hayseed  
#2 Posted : Thursday, July 20, 2006 1:39:12 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey tracy.... just tossing something out here, unverified.... perhaps using wabbits dll which included a simple moving average might help..... it returns results clean back to the first day......h verfied, it returns values.....
Exploration notes Col A: a:=ExtFml( "myMA2.SMA", C, 200); a Col B: ExtFml( "myMA2.EMA", C, 200) Filter colA OR colB Filter enabled Yes Periodicity Daily Records required 100
wabbit  
#3 Posted : Thursday, July 20, 2006 2:35:51 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
The IsDefined() and IsUnDefined() functions that are currently in MS are useless and do not meet the standard that yuo would think of this product. h was right... I did code up a .dll to handle this very situation where one data array could be substitued with another data array if the first array was not valid, but noone seemed interested in the code so I stopped its development. Like all things with MS there is a workaround using the Forum.dll and adaptive moving averages... Hope this helps. wabbit :D [thinking out loud] Maybe there is a use for my .dll after all?
hayseed  
#4 Posted : Thursday, July 20, 2006 2:59:12 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey wabbit.... i use your dll every day on several layouts.... or at least the 'myma2.dll' ..... matter a fact, i changed the name and have been selling it on ebay........h
Jose  
#5 Posted : Thursday, July 20, 2006 7:30:32 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
The IsDefined() & IsUndefined() MetaStock functions have their use, but not in this case. Your easiest solution: [code:1:e8eb35e53f]SMAperiods:=30; altPeriods:=12; pds:=If(Cum(1)<SMAperiods,altPeriods,SMAperiods); ExtFml("ASI.SMA",C,pds) [/code:1:e8eb35e53f] I would do it this way: [code:1:e8eb35e53f]SMAperiods:=30; altPeriods:=12; pds:=If(Cum(1)<SMAperiods,Cum(1),SMAperiods); ExtFml("ASI.SMA",C,pds) [/code:1:e8eb35e53f] The ASI & Forum DLLs are available here from the download section. jose '-)
smg  
#6 Posted : Friday, July 21, 2006 1:30:22 AM(UTC)
smg

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/13/2005(UTC)
Posts: 90

wabbit wrote:
The IsDefined() and IsUnDefined() functions that are currently in MS are useless and do not meet the standard that yuo would think of this product. h was right... I did code up a .dll to handle this very situation where one data array could be substitued with another data array if the first array was not valid, but noone seemed interested in the code so I stopped its development. Hope this helps. wabbit :D [thinking out loud] Maybe there is a use for my .dll after all?
Mr. Wabbit, There certainly is a very good use for your Dll, as I had mentioned while testing the beta version of it. I was thinking that you would proceed further once the beta testing was over. I will look forward to its formal launch. Regards SMG
Users browsing this topic
Guest (Hidden)
Similar Topics
NEW FUNCTION - Fix the formula functions IsDefined() (Product Wish List)
by wabbit 4/18/2006 1:41:05 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.