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

Re: [amibroker] Help to Lock in the Actual Buyiny Date



PureBytes Links

Trading Reference Links

There is a chandelier trailing stop code in the library.

On Tue, 24 Oct 2006 11:26:31 -0400, darwin_ding <darwin_ding@xxxxxxxxxxxx>  
wrote:

> Hello,
>
> I would like to code some sort of chandelier trailing stop (not the
> built-in ATR trailing stop) and the stop line will trail the HHV since
> the actual buying date. The sell instruction will then be generated
> based upon the stop line. The code is something like the following:
>
> Stop_Line=HHV(High,BarsSince(Buy))-2.5*ATR(14);
> Sell=cross(close,Stop_Line);
>
> However, the excessive buy signals will reset the BarsSince(Buy) value
> and shift the stop line. I know the excessive buy signals can be removed
> by code the following code:
> buy = ExRem( buy, sell );
>
> But the ExRem() function will require sell value which will rely on
> correct stop line.
>
> Stop line --> Sell signal --> remove excessive buy signals --> get
> actual buy signal --> get correct Stop line --> dead loop
>
> Would anybody help me to lock in the actual buying date.
> Your help is highly appreciated.
>
> Best Regards,
>
> Darwin Ding
>
>
>
>
>
>
>
>
>
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


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/
 


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006