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

[amibroker] Re: dynamic vertical line



PureBytes Links

Trading Reference Links

Peter,

I assume you mean the vertical red line is not following the 32-bar
highs down after a higher high. If you add a plot for "Hi" (as opposed
to "LastValue(Hi)") you'll probably see why.

In the ValueWhen function, try making your first test for
"H==LastValue(Hi)":

Hitime=BarIndex()==LastValue(ValueWhen(H==LastValue(Hi),BarIndex()));

GP


--- In amibroker@xxxxxxxxxxxxxxx, "blueinvestor" <abmessages@xxx> wrote:
>
> I am trying to get a vertical line to appear on my charts that will
> change when a high gets past the last 32 bars:
> 
> periods=32;
> Hi=HHV(H,periods);
> Plot(LastValue(Hi),"Hi",colorSkyblue,styleLine|styleNoLabel);
> Hitime=BarIndex()==LastValue(ValueWhen(H==Hi,BarIndex()));
> Plot(1+(Hi-1)*Hitime,"",colorRed,2048+2+styleNoLabel|styleThick);
> 
> Now this works when a new high is hit and the line follows as time
> progresses, but after the 32 periods the line still follows that bar
> and does not shift to a more recent high.  I can't figure out what I
> am doing wrong, anyone have any suggestions?
> 
> Thanks,
> Peter
>




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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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

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