PureBytes Links
Trading Reference Links
|
Buy = Cross(
MA( Close,
30 ), <FONT
color=#0000ff size=1>MA( Close, <FONT
color=#ff00ff size=1>50 ) );
Sell = 0<FONT
size=1>;
ApplyStop( stopTypeTrailing, stopModePoint,
2*<FONT
color=#0000ff size=1>ATR(<FONT color=#ff00ff
size=1>10), True, True);
e = Equity<FONT
size=1>(1);
GraphXSpace =5<FONT
size=1>;
Plot(Close,"Long
System",colorBlack,<FONT color=#ff00ff
size=1>128);
StopLoss =Min<FONT
size=1>(HighestSince<FONT
size=1>(Buy==1<FONT
size=1>,High,1<FONT
size=1>)-2<FONT
size=1>*ATR<FONT
size=1>(10<FONT
size=1>),Open);
Plot(StopLoss,"Stop
Loss",colorRed,<FONT color=#ff00ff
size=1>1);<FONT face="Courier New"
color=#0000ff size=1>
PlotShapes(<FONT
face="Courier New" color=#0000ff size=1>IIf<FONT face="Courier New"
size=1>(Sell==<FONT face="Courier New" color=#ff00ff
size=1>4<FONT face="Courier New"
size=1>,shapeDownArrow,shapeNone),colorRed); <FONT
face="Courier New">//added this
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=glennokb@xxxxxxxxxxxx
href="">glennokb
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, June 05, 2003 9:36
PM
Subject: [amibroker] Re: Plot
Applystop
Tony,Thanks for your help, makes it much clearer
now how to setup a chart, but using the following the ATR stop isn't on
the chart?------------------------------------------------Buy =
Cross( MA( Close, 30 ), MA( Close, 50 ) );Sell = 0;ApplyStop(
stopTypeTrailing, stopModePoint, 2*ATR(10), True, True);e =
Equity(1);GraphXSpace =5;Plot(Close,"Long
System",colorBlack,128);StopLoss
=Min(HighestSince(Buy==1,High,1)-2*ATR(10),Open);Plot(StopLoss,"Stop
Loss",colorRed,1);------------------------------------------------Cheers
Glenn--- In amibroker@xxxxxxxxxxxxxxx, "Tony/Dianne"
<awenos@xxxx> wrote:> >>I had a look at ApplyStop in the
manual and at the bottom of the page it > >>has:>
> >>ApplyStop( stopTypeTrailing, stopModePoint, 2*ATR(10), True,
True );> > >>Equity(1); // THIS EVALUATES
STOPS> >>Plot(Sell=4,"ApplyStop
Sell",colorRed,1|styleOwnScale);> > >>I placed the above
in the indicator builder but doesn't seem to work.> >
>>Sorry if this is a really basic question, but I have looked
through the > >>manual. Maybe I have to take off my Metastock
head ! :-)> > >>Cheers, Glenn> > >
Glenn,> > Try the following code in IB, where my TrailStop ==
your 2*ATR(10)> //#### Your buy rules here ####> Sell = 0;
> ApplyStop(stopTypeTrailing, stopModePoint, TrailStop, True,
True);> e =
Equity(1);
//Creates
equivalent of a back test> GraphXSpace
=5;
//Allow space at top and bottom of chart> Plot(Close,"Long
System",colorGreen,64);
//Plot a basic candlestick chart> StopLoss
=Min(HighestSince(Buy==1,High,1)-TrailStop,Open); //Define Applystop
level> Plot(StopLoss,"Stop
Loss",colorRed,1);
//Plot Applystop Level> > > Please note that this
stop is volatile and using ATR(10) will show up> with an up &
down trail stop. Using a longer period for ATR will smooth>
out the up and down.> > Regards,> >
Tony
Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
<BLOCKQUOTE
><FONT
face="Courier New">---Outgoing mail is certified Virus
Free.Checked by AVG anti-virus system (<A
href="">http://www.grisoft.com).Version: 6.0.488
/ Virus Database: 287 - Release Date: 6/5/2003
Yahoo! Groups Sponsor
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 the Yahoo! Terms of Service.
|