PureBytes Links
Trading Reference Links
|
Hi, Stephane:
OK, I see what you mean. For trailing stops, points are subtracted from the
HIGH (or added to the LOW for shorts). ApplyStop is hard coded for the high
or low on trailing stops, so in your last 2 examples, you could not use
ApplyStop. Would your scRem.dll do that?
Al Venosa
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=s.carrasset@xxxxxxxxxxx
href="">Stephane Carrasset
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, April 01, 2004 4:31
PM
Subject: Re: [amibroker] Re: ApplyStop()
in RT
Al,
Applystops, and I am thinking to stoploss and
trailingstop modes, are perfect if the amount is written in
point.
for example
ApplyStop
(stopTypeTrailing, stopModePoint,
2*ATR(10),exitatstop=True,volatile=False,reentrydelay=1) ;
you can check the trailing at
Plot(HighestSince(Buy, H -
ValueWhen(Buy,2*ATR(10))),"",colorBlue,1);
OR for baktesting futures <FONT
color=#0000ff>
ApplyStop
(stopTypeTrailing, stopModePoint, 20,
exitatstop=True,volatile=False,reentrydelay=<FONT
color=#ff00ff>1) ;
you can check the trailing at
<FONT color=#0000ff
size=2>Plot(HighestSince(Buy,
H -
ValueWhen(Buy,TrailStop)),"Trailing",colorGreen,1<FONT
size=1>);
But when you want the stop level was
at Ref(Low,-1) OR C-2*atr(10) OR Open-30
points,
<FONT
face=Arial>you must scratch your head to set the correct amount, is it
from Buyprice? or from High?
<SPAN lang=EN-GB
>I
suppose it is from high...
<FONT
size=2>
<SPAN lang=EN-GB
>if you want the stop at
HighestSince(Buy,Ref(<FONT
color=#0000ff>HIGH,-1) - 2*ATR(10)) OR <FONT color=#008000
size=1>
HighestSince(Buy,Ref(<FONT
color=#0000ff>LOW,-1) - 2*ATR(10))
<P class=MsoNormal
><SPAN
lang=EN-GB
><FONT
face="Times New Roman">you can't
<P class=MsoNormal
><SPAN
lang=EN-GB
><FONT
face="Times New Roman">
<P class=MsoNormal
><SPAN
lang=EN-GB
><FONT
face="Times New Roman">
----- Original Message -----
From: "Al Venosa" <<A
href=""><FONT face=Arial
size=2>advenosa@xxxxxxxxxxxx<FONT face=Arial
size=2>>
To: <<A
href=""><FONT face=Arial
size=2>amibroker@xxxxxxxxxxxxxxx<FONT face=Arial
size=2>>
Sent: Thursday, April 01, 2004 8:48
PM
Subject: Re: [amibroker] Re: ApplyStop() in
RT
<FONT face=Arial
size=2>> Stephane:> > What is it about ApplyStop function you
don't like ApplyStop?> > > ----- Original Message -----
> From: "Stephane Carrasset" <<A
href=""><FONT face=Arial
size=2>s.carrasset@xxxxxxxxxxx>>
To: <<FONT face=Arial
size=2>amibroker@xxxxxxxxxxxxxxx<FONT face=Arial
size=2>>> Sent: Wednesday, March 31, 2004 10:51 AM> Subject:
[amibroker] Re: ApplyStop() in RT> > > >
Hermann,> >> > if I understand you, the applystops are not
executed with minutes> > Bars.> > Hum? I don't like
applystop except for backtesting futures ( the> > amount of stops in
point is easy to write).> >> > I copy a winning system on
the S&P ( winning on the paper,and> > backtest from 02/01 to
09/03), and the applystop are executed> > correctly. I don't trade
the S&P future.> >> > the settings are> >
commission: 5/contracts> > future mode : check> > active
stop immediately:check> > allow same bar exit:check>
>> > stephane> >> >> >>
>> > //Title="AAZ long Applystop";> >> >
Tradezone = (TimeNum() >= 200500 AND TimeNum() < 214000);> >
Horaire = (TimeNum() >= 163000 AND TimeNum() < 200500);> >
PicHoraire= Hold(Horaire==0,2) AND Horaire;> > Hiday=
HHV(H,BarsSince(pichoraire));> > LoDay=
LLV(L,BarsSince(pichoraire));> >> > Hiday=
HHV(H,BarsSince(pichoraire));> > LoDay=
LLV(L,BarsSince(pichoraire));> >> > Buystop=Ref(Hiday +
1.5,-1);> > Plot(Buystop,"",colorGreen,1);> >
Sellstop=Ref(LoDay - 1.5,-1);> >
Plot(Sellstop,"",colorGreen,1);> >> > Buy = H>=Buystop
AND Tradezone;> > Buy=Hold(Buy==0,2) AND Buy AND Tradezone ;>
>> > Stoploss= 16 ;> > Trailstop= 32 ;
//O-63;> > Target= 20;> >> > Sell= TimeNum()
>220500;> > BuyPrice=Buystop;> >> > ApplyStop
(stopTypeProfit, stopModePoint,> > Target
,exitatstop=True,volatile=False,ReEntryDelay=1) ;> > ApplyStop
(stopTypeLoss, stopModePoint, StopLoss,> >
exitatstop=True,volatile=False,ReEntryDelay=1) ;> > ApplyStop
(stopTypeTrailing, stopModePoint, Trailstop,> >
exitatstop=True,volatile=False,reentrydelay=1) ;> >> > /*
le mode de calcul du trailing est # de Rem.dll il est fonction de> >
highest H - valuewhen(Buy,value point)*/> >> >
Equity(1,0);> >> > Plot(Close,"close",IIf( Buy,
colorGreen, IIf(Sell ,> > colorRed ,1 )),64);> >
Plot(ValueWhen(Buy,BuyPrice),"BuyPrice",colorWhite,1);> >
Plot(ValueWhen(Sell,SellPrice),"SellPrice",colorYellow,1);> >
PlotShapes(IIf(Buy,> >
shapeUpArrow,shapeNone),colorGreen,0,C,-20);> >
PlotShapes(IIf(Sell,> >
shapeDownArrow,shapeNone),colorRed,0,H,-20);> >> >
Plot(ValueWhen(Buy,BuyPrice-StopLoss),"StopLoss",colorRed,1);> >
Plot(HighestSince(Buy, H - ValueWhen> >
(Buy,TrailStop)),"Trailing",colorGreen,1);> >
Plot(ValueWhen(Buy,BuyPrice+Target),"Target",colorBlue,1);>
>> > GraphXSpace=1;> >> > Title="AAZ short
Applystop";> >> > Sellstop=Ref(LoDay - 1.5,-1);>
> Plot(Sellstop,"",colorGreen,1);> >> > Short =
L<=Sellstop AND Tradezone;> > Short=Hold(Short==0,2) AND Short
AND Tradezone ;> >> > Stoploss= 16 ;> >
Trailstop= 32 ; //O-63;> > Target= 20;> >>
> Cover= TimeNum() >220500;> > ShortPrice=SellStop;>
>> > ApplyStop (stopTypeProfit, stopModePoint,> >
Target ,exitatstop=True,volatile=False,ReEntryDelay=1) ;> >
ApplyStop (stopTypeLoss, stopModePoint, StopLoss,> >
exitatstop=True,volatile=False,ReEntryDelay=1) ;> > ApplyStop
(stopTypeTrailing, stopModePoint, Trailstop,> >
exitatstop=True,volatile=False,reentrydelay=1) ;> >> >
Equity(1,0);> >> > Plot(Close,"Close",IIf( Short,
colorGreen, IIf(Cover ,> > colorRed ,1 )),64);> >
Plot(ValueWhen(Short,ShortPrice),"ShortPrice",colorWhite,1);> >
Plot(ValueWhen(Cover,CoverPrice),"CoverPrice",colorYellow,1);> >
PlotShapes(IIf(Short,> >
shapeDownArrow,shapeNone),colorBlue,0,C,-10);> >
PlotShapes(IIf(Cover,> >
shapeUpArrow,shapeNone),colorYellow,0,C,-10);> >> >
Plot(ValueWhen(Short,ShortPrice+StopLoss),"StopLoss",colorRed,1);> >
Plot(LowestSince(Short, L + ValueWhen> >
(Short,TrailStop)),"Trailing",colorGreen,1);> >
Plot(ValueWhen(Short,ShortPrice-Target),"Target",colorBlue,1);>
>> > GraphXSpace=1;> >> >
SetOption("InitialEquity", 20000 );> > MarginDeposit = 1500;>
> RoundLotSize = 1;> > PointValue = 50;> > NumContracts
= 100;> > PositionSize = Min((NumContracts *
MarginDeposit),Equity());> >> >> >>
>> > <<FONT face=Arial
size=2>psytek@x...> wrote:> >
> hello stephane,> > >> > > my entries are at the
open, the signal last only one minute (093000-> > 093100)>
> > my exits are supposed to be real time and are independent from
the> > entries.> > > I used> > >>
> > SetOption("AllowSameBarExit",True);> > >
SetOption("ActivateStopsImmediately",True);> > >> >
> My exitprices in settings are set to Open (should be irrelevant)>
> however the> > > exit time for my Stops show as 16:00
(Close). No idea what i am> > doing> > >
wring....> > >> > > TIA for any help you can
give,> > > herman.> > >> > >>
> > -----Original Message-----> > >
From: Stephane Carrasset [mailto:s.carrasset@xxxx]> >
> Sent: Wednesday, March 31, 2004 6:13 AM> >
> To: <FONT
face=Arial size=2>amibroker@xxxxxxxxxxxxxxx<FONT face=Arial
size=2>> > > Subject: Re: [amibroker] ApplyStop() in
RT> > > Importance: High> > >>
> >> > > Herman,> > >> >
> I don't understand, do you mean you can't use applystop in
real> > time data.> > > because applystop
works well in backtesting futures on already> > known> >
> minutes bar.> > >> > >
stephane> > > ----- Original Message
-----> > > From: Herman van den
Bergen> > > To: AmiBroker
YahooGroups> > > Sent: Wednesday, March
31, 2004 4:08 AM> > > Subject:
[amibroker] ApplyStop() in RT> > >> > >> >
> Can somebody tell me if i can use the ApplyStop()
in RT minute> > data?> > >> >
> When i inspect the trade list i notice that all
stops take> > place at> > > 09:31:00 (This system
trades at the Open) and i cannot seem to find> > a way to>
> > make them exit at any other times. My entry signals are at
the> > Open... but> > > what do i have to do to see my
Stops take places at various times> > during the> > >
day? Is anybody getting stops at different times during the day?> >
>> > > btw, the help does not mention
RT wrt the ApplyStop... I> > backtest using> > >
minutes, have stops set to exit immediately, same day exits allowed.>
> >> > > TIA for any help you can
give.> > > herman.> >
>> > >> > > Send BUG
REPORTS to <FONT face=Arial
size=2>bugs@x...> >
> Send SUGGESTIONS to <A
href="">suggest@x<FONT
face=Arial size=2>...> > >
-----------------------------------------> >
> Post AmiQuote-related messages ONLY to: <A
href=""><FONT face=Arial
size=2>amiquote@xxxxxxxxxxxxxxx>
> > (Web page: <A
href=""><FONT face=Arial
size=2>http://groups.yahoo.com/group/amiquote/messages/<FONT
face=Arial size=2>)> > >
--------------------------------------------> >
> Check group FAQ at:> > > <A
href=""><FONT
face=Arial
size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT
face=Arial size=2>> > >> > >> > >>
> > __________ NOD32 1.699 (20040330)
Information __________> > >> >
> This message was checked by NOD32 antivirus
system.> > > <A
href=""><FONT face=Arial
size=2>http://www.nod32.com> >
>> > >> > >> > > Send
BUG REPORTS to <FONT face=Arial
size=2>bugs@x...> >
> Send SUGGESTIONS to <FONT
face=Arial size=2>suggest@x...> >
> -----------------------------------------> >
> Post AmiQuote-related messages ONLY to: <A
href=""><FONT face=Arial
size=2>amiquote@xxxxxxxxxxxxxxx>
> > (Web page: <A
href=""><FONT face=Arial
size=2>http://groups.yahoo.com/group/amiquote/messages/<FONT
face=Arial size=2>)> > >
--------------------------------------------> > >
Check group FAQ at:> > > <A
href=""><FONT
face=Arial
size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT
face=Arial size=2>> > >> > >> >
> Yahoo! Groups
Sponsor> >
>
ADVERTISEMENT> > >> > >> > >>
> >> > >> > >
-------------------------------------------------------------------->
> --------> > > --> > > Yahoo! Groups
Links> > >> > > a.. To visit
your group on the web, go to:> > >
<FONT face=Arial
size=2>http://groups.yahoo.com/group/amibroker/<FONT face=Arial
size=2>> > >> > > b.. To
unsubscribe from this group, send an email to:> >
> <A
href=""><FONT face=Arial
size=2>amibroker-unsubscribe@xxxxxxxxxxxxxxx<FONT face=Arial
size=2>> > >> > > c.. Your use
of Yahoo! Groups is subject to the Yahoo! Terms of> >
Service.> >> >> >> > Send BUG REPORTS
to <FONT face=Arial
size=2>bugs@xxxxxxxxxxxxx> > Send
SUGGESTIONS to <FONT face=Arial
size=2>suggest@xxxxxxxxxxxxx> >
-----------------------------------------> > Post AmiQuote-related
messages ONLY to: <FONT
face=Arial size=2>amiquote@xxxxxxxxxxxxxxx<FONT face=Arial
size=2>> > (Web page: <A
href=""><FONT face=Arial
size=2>http://groups.yahoo.com/group/amiquote/messages/<FONT
face=Arial size=2>)> >
--------------------------------------------> > Check group FAQ
at:> <A
href=""><FONT
face=Arial
size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT
face=Arial size=2>> > Yahoo! Groups Links> >>
>> >> >> >> > > >
------------------------ Yahoo! Groups Sponsor
---------------------~-->> Buy Ink Cartridges or Refill Kits for
your HP, Epson, Canon or Lexmark> Printer at MyInks.com. Free s/h
on orders $50 or more to the US & Canada.> <A
href=""><FONT face=Arial
size=2>http://www.c1tracking.com/l.asp?cid=5511<FONT face=Arial
size=2>> <A
href=""><FONT
face=Arial
size=2>http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM<FONT
face=Arial size=2>>
---------------------------------------------------------------------~->>
> Send BUG REPORTS to <FONT
face=Arial size=2>bugs@xxxxxxxxxxxxx<FONT face=Arial
size=2>> Send SUGGESTIONS to <A
href=""><FONT face=Arial
size=2>suggest@xxxxxxxxxxxxx>
-----------------------------------------> Post AmiQuote-related
messages ONLY to: <FONT
face=Arial size=2>amiquote@xxxxxxxxxxxxxxx
> (Web page: <A
href=""><FONT face=Arial
size=2>http://groups.yahoo.com/group/amiquote/messages/<FONT
face=Arial size=2>)>
--------------------------------------------> Check group FAQ at:
<A
href=""><FONT
face=Arial
size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT
face=Arial size=2> > Yahoo! Groups Links> > <*> To
visit your group on the web, go to:> <A
href=""><FONT face=Arial
size=2>http://groups.yahoo.com/group/amibroker/<FONT face=Arial
size=2>> > <*> To unsubscribe from this group, send an email
to:> <A
href=""><FONT face=Arial
size=2>amibroker-unsubscribe@xxxxxxxxxxxxxxx<FONT face=Arial
size=2>> > <*> Your use of Yahoo! Groups is subject
to:> <A
href=""><FONT face=Arial
size=2>http://docs.yahoo.com/info/terms/<FONT face=Arial
size=2>> > > > __________ NOD32 1.701 (20040401)
Information __________> > This message was checked by NOD32
antivirus system.> <FONT
face=Arial size=2>http://www.nod32.com<FONT face=Arial
size=2>> > 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
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 the Yahoo! Terms of Service.
|