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

RE: [amibroker] Using Symbol Information in AFL?



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Stephane, glad to hear it works, for some reason it didn't in my 
application - my fault undoubtedly. Today i will take some time to start from 
the bottom up, I think most problems will solve themselves as i gradually build 
up my code up to where it meets my EOD functionality.
<FONT face=Arial color=#0000ff 
size=2> 
Have a 
great day!
<FONT face=Arial color=#0000ff 
size=2>herman.
<SPAN 
class=843193917-31032004><FONT face=Arial 
color=#0000ff> 
<SPAN 
class=843193917-31032004> 
<SPAN 
class=843193917-31032004> -----Original Message-----From: 
Stephane Carrasset [mailto:s.carrasset@xxxxxxxxxxx]Sent: Wednesday, 
March 31, 2004 12:14 PMTo: 
amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: ApplyStop() in 
RT
I think that I don't understand what you mean, because once 
  you have set the periodicity to 1 minute in the settingsapplystop 
  works correctly in minutes bars 
  basisstephane<psytek@xxxx> wrote:> This being 
  my first month in RT i am coming accross some questions that may> 
  be so obvious that they are not answered anywhere,.like:> > 1) 
  is the ApplyStop() intended to be used in RT? If so, do the EOD 
  arguments> still hold in an RT environment?> 2) is 
  SetTradeDelays() intended to be used in RT? If so, are the Delays 
  now> in RT bars or do they still reference EOD bars?> 3) What 
  other functions are there that make no sense in RT and should not 
  be> used there?> > I am using some very simple systems to 
  test things out practically and may> have to write my own stop-code 
  to be sure it works as intended. This is no> problem, but why do it 
  the hard way if there is an easier way?> > This is one of the 
  burdens of translating EOD systems to RT, I suppose I'll> have to 
  work through the entire code line by line :-)> > Thanks,> 
  herman.>   -----Original Message----->   
  From: Stephane Carrasset [mailto:s.carrasset@xxxx]>   Sent: 
  Wednesday, March 31, 2004 10:51 AM>   To: 
  amibroker@xxxxxxxxxxxxxxx>   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());> > > 
  > >   <psytek@xxxx> 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: 
  amibroker@xxxxxxxxxxxxxxx>   >   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 bugs@xxxx>   
  >     Send SUGGESTIONS to 
  suggest@xxxx>   >     
  ----------------------------------------->   
  >     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>   
  >>   >>   >>   
  >     __________ NOD32 1.699 (20040330) Information 
  __________>   >>   
  >     This message was checked by NOD32 antivirus 
  system.>   >     <A 
  href="">http://www.nod32.com>   
  >>   >>   >>   
  >   Send BUG REPORTS to bugs@xxxx>   
  >   Send SUGGESTIONS to suggest@xxxx>   
  >   ----------------------------------------->   
  >   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>   
  >>   >>   
  >         Yahoo! Groups 
  Sponsor>   
  >               
  ADVERTISEMENT>   >>   
  >>   >>   >>   
  >>   > 
  -------------------------------------------------------------------->   
  -------->   > -->   >   
  Yahoo! Groups Links>   >>   
  >     a.. To visit your group on the web, go 
  to:>   >     <A 
  href="">http://groups.yahoo.com/group/amibroker/>   
  >>   >     b.. To unsubscribe from 
  this group, send an email to:>   >     
  amibroker-unsubscribe@xxxxxxxxxxxxxxx>   
  >>   >     c.. Your use of Yahoo! 
  Groups is subject to the Yahoo! Terms of>   
  Service.> > > >   Send BUG REPORTS to 
  bugs@xxxx>   Send SUGGESTIONS to 
  suggest@xxxx>   
  ----------------------------------------->   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> 
  > > > 
  ----------------------------------------------------------------------------> 
  -->   Yahoo! Groups Links> 
  >     a.. To visit your group on the web, go 
  to:>     <A 
  href="">http://groups.yahoo.com/group/amibroker/> 
  >     b.. To unsubscribe from this group, send an 
  email to:>     
  amibroker-unsubscribe@xxxxxxxxxxxxxxx> >     
  c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
  Service.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 Sponsor


  ADVERTISEMENT 












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.