You need to use a different format. ApplyStop will always be in referenceto 
the buyprice.

Try this:

Sell = iif(Cross(Low,Ref(LLV(L,21),-1)));

Your support line becomes LLV(L,21) up to 2nd last bar.

----- Original Message ----- 
From: "Christy Wagner" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, October 15, 2008 7:11 PM
Subject: [amibroker] applystop() function


>I am trying to use this function as a trailing stop.
>
> ApplyStop(stopTypeTrailing, stopModePoint, LLV(L,21)+0.07,1);
>
> I want it to reference the llv(l,21) instead of the entry point.  How
> do I do that?
>
> In other words I want my trailing stop to be the lowest low of the
> past 21 days +0.07 and as the market moves in my favor this will also
> increase.  So it will be dynamic.  If I simply put 0.07 in the
> "amount" field I will exit my entry point + 0.07.  If I put llv(l,21)
> +0.07 in the "amount" field it won't trigger because it is taking the
> llv(l,21) + 0.07 and adding to my entry point, which will never get hit.
>
> Is there a way to have this function reference another level to
> add/subtract the "amount" field other than the entry point?
>
> Eric
>
>
> ------------------------------------
>
> **** IMPORTANT ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> *********************
> TO GET TECHNICAL 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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 

Reply via email to