PureBytes Links
Trading Reference Links
|
Markus,
Well, we do not have the super automatic HighestBetween() function,
but there are many ways to get it.
Suppose x>y and both <Lastvalue(Cum(1)). Stay on the most recent bar
x and find the HHV(H,x-y) [LLV(L,x-y) respectively].
With this simple argument you will avoid more complicated "between"
conditions, "barssince" calculations etc.
Play with the code [my Lastvalue(Cum(1)) is 797]
x=790;y=755;
Cond1=Cum(1)==x;Cond2=Cum(1)==y;
Hmax=LastValue(ValueWhen(Cond1,HHV(H,x-y)));
Lmin=LastValue(ValueWhen(Cond1,LLV(L,x-y)));
Plot(IIf(Cum(1)>=y,Hmax,-1e10),"",5,8);
Plot(IIf(Cum(1)>=y,Lmin,-1e10),"",4,8);
Plot(C,"",1+6*(Cond1 OR Cond2),64);// to paint and see the x, y
candles
DT
--- In amibroker@xxxxxxxxxxxxxxx, "IVA GmbH" <funnybiz@xxxx> wrote:
> Folks,
>
> another thing:
>
> What would be the code for the following:
>
> find the highest high between cum(x) and cum(y)
>
> Markus
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Web Hosting makes it easy to build a professional web site.
Sign up today and get free set-up, domain name, and more (up to a $100 value)
http://us.click.yahoo.com/m3JvCD/wCpFAA/46VHAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|