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

RE: [AmiBroker] Plot ATR trailing stop which only increases



PureBytes Links

Trading Reference Links

Here's one example;
 

/* Volatility Truth */

EntrySignal = C > ( LLV( L, 20 ) + 2 * ATR( 10 ) );

ExitSignal = C < ( HHV( H, 20 ) - 2 * ATR( 10 ) );

Color = IIf( EntrySignal, colorBlue, IIf( ExitSignal, colorOrange, colorGrey50 ));

TrailStop = HHV( C - 2 * ATR(10), 15 );

ProfitTaker = EMA( H, 13 ) + 2 * ATR(10);

/* plot price chart and stops */

Plot( TrailStop, "Trailing stop", colorBrown, styleThick | styleLine );

//Plot( ProfitTaker, "Profit taker", colorLime, styleThick );

Plot( C, "Price", Color, styleBar | styleThick );

/* plot color ribbon */

Plot( 1, "", Color, styleArea | styleOwnScale | styleNoLabel, -0.1, 50 );

 

 

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]On Behalf Of amickan1958
Sent: Thursday, November 22, 2007 12:39 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Plot ATR trailing stop which only increases

Hi,

I've been trying to crack this one but can't seem to. What I need is a
plot of my trailing stop. The stop is based on a multiplier of todays
ATR(30) value. This stop only ever increase.

Can anyone help me out with some code please?

Thanks

Andrew

__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___