Hi

I wanted to plot some horizontal lines extending from successive hi and lo
pivot points. The code below illustrates the intention but does not work as
I guess IIF is evaluating the argument arrays prior to execution.

Wondering if there is a way to do this without looping? Basically need
method to propagate same value thru array until condition changes then
propagate next value...

John

8<
/* draw horizontal lines at hi & lo pivot points*/
//P = ParamField("Price field",-1);
p=Close;
Hipiv = IIf(P<Ref(P,-1) AND (Ref(P,-1)>Ref(P,-2)),1,0);
Lopiv = IIf(P>Ref(P,-1) AND (Ref(P,-1)<Ref(P,-2)),1,0);
Hline=0;
hline=IIf(hipiv==1,Ref(p,-1),Ref(hline,-1));
Plot (C,"close",colorBlack);
Plot (Hline,"hline",colorRed);
8<
/



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

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

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

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

Reply via email to