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

[EquisMetaStock Group] Plotting Gaps with 3 inputs



PureBytes Links

Trading Reference Links

I can plot gaps with the formula: If( GapUp(), 1, If( GapDown(), -1, 
0 )) but I want to plot Gaps with 3 inputs (choices) as under:

1) To plot a +1 signal for Up Gaps only and nothing for Down Gaps.
2) To plot a -1 for Down Gaps only and nothing for Up Gaps.
3) To plot both signals: +1 for Up Gaps and -1 for Down Gaps.

I have written the following code but I get +1 for Up Gaps only for 
for the first choice and straight lines for the other two. Where am I 
wrong?

plot:=Input("1=GapUp 2=GapDn 3=Both", 1, 3, 3);
x:= If( plot=1, GapUp()=1 AND GapDown()=0, If( plot=2, GapUp()=0 AND 
GapDown()=-1, If( plot=3, GapUp()=1 AND GapDown()=-1, 0 )));
x

arun103




 
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/