PureBytes Links
Trading Reference Links
|
> Buystop = ValueWhen(LLV(L,10),H,1);
The specific problem with this statement is that the first parameter
for ValueWhen has to resolve to a True or False condition, with
anything non-zero being True. As LLV returns a price array, which
would generally not have any zeroes in it, every bar will effectively
have a True condition, so the most-recent occurrence will always be at
the most-recent bar.
As has been suggested, L == LLV() will return True only for bars where
the Low array value actually equals the LLV value, which I think is
what you want.
Regards,
GP
--- In amibroker@xxxxxxxxxxxxxxx, "cipherscribe"
<adrian.mollenhorst@xxx> wrote:
>
> Hi There,
>
> I'm not sure if I am doing this right, but I am trying to code into a
> variable a high value when price drops to it's llv in 10 periods. For
> example:
>
> Buystop = ValueWhen(LLV(L,10),H,1);
>
> The only problem with this is that the variable stores the High for
> the last bar. I need to know the value of the high when price reached
> it's LLV.
>
> I have also tried:
>
> Buystop = lastvalue(ValueWhen(LLV(L,10),H,1));
>
> but that simply gives me the high of the last bar also.
>
> I am not a great coder, but I think this has to do with the entire
> high array being passed to the variable. How do I store just one value
> - the one I need?
>
> Do I need some looping here?
>
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/
|