PureBytes Links
Trading Reference Links
|
Hi Graham, not much else to do on a wet Perth afternoon!?
Unfortunately I dont think this works because 'buy' is in effect the
previous value of 'variable' and Ami will not let you call a value
until its defined.
I tried:
value=1.1*C;
value=iif( C>ref(value,-1) , 1.1*C , ref(value,-1) );
I thought this would carry updated 'value' forward but as usual I was
wrong!
Redards
--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> This may work
> Value = highestsince(Buy,1.1*C);
>
> Cheers,
> Graham
> http://e-wire.net.au/~eb_kavan/
>
> -----Original Message-----
> From: doedau [mailto:don.edwards@x...]
> Sent: Sunday, May 09, 2004 5:10 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] I cant get this to work
>
> Hi,
> Could you help please, I ought to be able to code this but cant
make
> it work.
>
> 1. set an initial value = 1.1*Close
> 2. hold that value constant until Close>value
> 3. then reset value (or some other variable) to new higher 1.1*C
> 4. hold that new value constant until again Close> new value
> 5. keep repeating steps 3 and 4
>
> Its something like a trailing stop but above the close (I dont want
> to use applystop() even if it would do the job, as this is only
part
> of the code I am developing).
>
> Many thanks in advance, Regards Don.
>
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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
> Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|