[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: Alternative IF function ??



PureBytes Links

Trading Reference Links

Tony, your solution to the undefined plot problem is here:

http://www.metastocktools.com/MetaStock/noNull.txt


jose '-)
http://www.metastocktools.com




--- In equismetastock@xxxxxxxxxxxxxxx, Tony M <t4tonym@xxx> wrote:
>
> 
> Dear Metastock colleagues,
> 
> The "IF" function is widely used, but for many applications, the 
way this function is implemented in Metastock is not completely 
satisfactory. As we know, the structure is typically (for example):  
IF (A > B, C, D) meaning "If condition A>B is true, then output C, 
otherwise output D". Consequently, if A and B are both fully defined 
at all times, and A is >B, then we get output C. What we (or at least 
I) expect is that, if A is not > B, then we should ALWAYS get output 
D. However this is not the case. In situations where A<=B it works 
fine, but in situations where it isn't true that A>B with reason 
being that either A or B is not defined, then we do not succeed in 
getting the  hoped-for output D.  I would like to find a remedy for 
this type of situation.
> 
> As an example, with code "If(C>Mov(C,100,E),C,-1)", I would like to 
get output -1
> if the condition C>Mov(C,100,E) is not satisfied either because of 
a situation where C is <= Mov(C,100,E), or alternatively when 
Mov(C,100,E) is not defined. I have tried implementing this using a 
combination of the "IF" and the
> "ISDEFINED" & "ISUNDEFINED" Metastock functions, but I have not 
succeeded in getting
> it to work. It is easy to code the logic for this in a programming 
language such as Visual Basic, and so I would also like to implement 
this in Metastock using the MDK, but I am still new to the MDK and 
struggling with understanding the correct way of specifying the 
required arrays in the Metastock MDK.
> 
> Has anyone successfully implemented this useful alternative form of 
the IF function in  Metastock, either by:
> a) using a combination of the standadrd Metastock internal 
functions ?, or
> b) using the MDK to write a DLL to include into Metastock as an 
external function ? 
> 
> Hoping for help / ideas....
> best regards,
> Tony




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/