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

Notification

Icon
Error

Options
Go to last post Go to first unread
sgrsankar  
#1 Posted : Tuesday, April 11, 2006 5:56:39 PM(UTC)
sgrsankar

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/17/2006(UTC)
Posts: 7
Location: New delhi

For indicator like mov(c,20,s), first 19 bars indicator will not be defined. Say I would like to take Close in place of undefined values of that indicator. My formula I tried as follows which is not working: MA:=IF(isdefined(mov(c,20,s)),mov(c,20,s),c) MA; How to use a default value for undefined values? Can somebody point me an example? Thanks in advance Sankar
mstt  
#2 Posted : Tuesday, April 11, 2006 8:16:02 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Sankar The IsDefined() function is not up to the task. There are a couple of proprietry DLLs that do the job properly, but unless you have purchased the relevant plug-ins they are not going to help you either. Thankfully you can use the Forum Dll from the downloads section of this site to do exactly what you want. Most functions from Patrick's dll return no N/A bars, though some of them substitute zero for N/A. The March issue of MetaStock Tips & Tools has the following two examples, taken from the "Impressions Of The Forum DLL" article. I hope they help. I'm sure there are a number of alternative solutions also possible with this DLL. M:=Mov(C,20,S); X:=ExtFml("Forum.Sum",M,1); M:=If(X=0,Cum(C)/Cum(1),X); M; M:=Mov(C,20,E); X:=ExtFml("Forum.Sum",M,1); M:=If(X=0,Cum(C)/Cum(1),X); M; Roy MetaStock Tips & Tools
wabbit  
#3 Posted : Wednesday, April 12, 2006 12:42:03 AM(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)
Sankar, Roy, All I am in the process of writing an addendum to the ForumDll that will include a modified MA that will use short averages in the period when the number of bars is less than the required MA period. I will publish with the next drop of the ForumDll file. Stay tuned. wabbit :D P.S. To speed up the development: please help where you can : http://forum.equis.com/viewtopic.php?t=3735
Users browsing this topic
Guest (Hidden)
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.