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

RE: [amibroker] Re: Exrem - Buy Only



PureBytes Links

Trading Reference Links




The one main area 
where the additional buy signals cause a problem is when your sell is related to 
the buy signal either by time or price. The sell will recognise the additional 
buy signals and reset its calculation based on that. This can cause the sell to 
move further out, or in event of applystop could bring it sooner, than 
would otherwise be the case. This would make your backtesting produce unreal 
results. Of course this would not be the case if you use the additional buy 
signals within your trade plan.
 
 
Cheers,Graham<A 
href="">http://groups.msn.com/asxsharetrading<A 
href="">http://groups.msn.com/fmsaustralia 


  
  <FONT 
  face=Tahoma size=2>-----Original Message-----From: Dave Merrill 
  [mailto:dmerrill@xxxxxxx] Sent: Sunday, 14 December 2003 8:03 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
  Re: Exrem - Buy Only
  <SPAN 
  class=954244711-14122003>Are you saying that you've actually seen the 
  backtester take more than one consecutive buy or sell on the same stock in a 
  row, without an intervening opposite signal?!? I haven't, ever. I suppose it's 
  possible I didn't notice a rare exception, but I bet someone would have. 
  
  <SPAN 
  class=954244711-14122003> 
  <SPAN 
  class=954244711-14122003>Or maybe you've seen the backtester take a signal 
  other than the first of consecutive signals in the same direction? That I'm 
  less certain I haven't seen, but I am quite sure I'd call that a bug. Is that 
  not so? Can you point me to somewhere in the docs or something Tomasz has said 
  that indicates otherwise? Where ExRem-ing trade signals is said to be 
  *required* for proper operation? I'd think that would be an important piece of 
  info to mention, say, in the docs for ExRem.
  <SPAN 
  class=954244711-14122003> 
  <SPAN 
  class=954244711-14122003>One piece of evidence that the backtester does this, 
  and is supposed to, is in the docs for the Equity function, describing the 
  behavior of Flag (1st parameter) value 1:
  <SPAN 
  class=954244711-14122003> 
  <FONT 
  face="Courier New">"works as 0 but additionally 
  updates buy/sell/short/cover arrays so all 
  redundant signals are removed <FONT 
  color=#ff0000>exactly as it is done internally by the 
  backtester plus all exits by stops are applied so it is 
  now possible to visualise ApplyStop() 
stops."
  <SPAN 
  class=954244711-14122003> 
  <SPAN 
  class=954244711-14122003>Dave
  <BLOCKQUOTE 
  ><which 
    the backtester does automatically anyway>Dave,I'm pretty 
    sure that the backtester does NOT automatically do as you say.I've 
    spent quite a lot of time working with the backtester, anddetermined 
    that I *ALWAYS* need to perform the ExRem functions myselfin order to 
    have absolute control over the last Buy, Sell, Short &Cover 
    signals.Whether I'm right or wrong, by taking absolute control over 
    thesesignals, there is no question about the sequence of events related 
    tothese signals.Regards,Phsst--- In 
    amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
    wrote:> Ed, I'd suggest thinking through what you intend ExRem to do 
    foryou. All it> does is remove duplicate signals in the same 
    direction, which thebacktester> does automatically anyway. 
    Typically it's only needed when you wantto plot> your own 
    buy/sell arrows in an indicator.> > In any case, "duplicate" 
    signals means ones without a signal in theopposite> direction 
    between them, like two buys in a row without a sell inbetween.> 
    That's why it takes two parameters -- it's about the 
    relationshipbetween> the signals in the two passed 
    arrays.> > That's why Sell has to be defined in the code you 
    sent. For usefulresults,> not just defined, as in set to zero, 
    but set to something thatalternates in> a meaningful way with 
    Buy. If Sell is always zero, once a Buyhappens, there> won't ever 
    be a Sell to alternate with, and your output will containonly> 
    that one first Buy.> > Make any sense?> > What 
    was the original problem you were trying to solve with ExRem?Were 
    you> plotting shapes or running a backtest? How were you thinking 
    you'dexit your> buys?> > Dave>   
    You just need to define the sell condition, otherwise exrem isopen 
    ended>   and undefineable>   You could try 
    using something that is impossible (normally) like> 
    >   Sell = C<0;//close < zero> 
    >   Cheers,>   Graham>   
    <A 
    href="">http://groups.msn.com/asxsharetrading>   
    <A 
    href="">http://groups.msn.com/fmsaustralia> 
    > >   Hi Graham.. Here's the code - Settings are 
    Long.> >   The error message is 
    :>   
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++>   
    Buy=ExRem(Buy,Sell);>   -------------------^> 
    >   Variable 'sell' used without having been 
    initialized.> >   Line 5, Column 20:> 
    >   
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++> 
    >   Code:>   
    ++++++++++++++++++++++++++++++++++++++++++++++++>   Buy = L 
    <= Ref(LLV(L,y),-1);> >   y=10;> 
    >   Buy = L <= Ref(LLV(L,y),-1);> 
    >   Buy=ExRem(Buy,Sell);> >   
    Filter= Close > 2 AND ( Buy);>   AddTextColumn( 
    FullName(), "Full name", 77 , colorDefault, IIf( Close>   
    < 10, colorLightBlue, colorDefault ) );> >   
    AddColumn (Close, "Close");> >   AddColumn (Buy, 
    "Buy");>   +++++++++++++++++++++++++++++> 
    >   Thanks, Ed> >   --- In 
    amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> 
    wrote:>   > Ed>   > You should be 
    able to just use it for longs only, I do.>   > Can you 
    describe the error message, and provide the relevant 
    code.>   >>   > Buy = 
    ExRem(Buy,Sell);>   >>   > 
    Cheers,>   > Graham>   > <A 
    href="">http://groups.msn.com/asxsharetrading>   
    > <A 
    href="">http://groups.msn.com/fmsaustralia>   
    >>   > -----Original Message----->   
    > From: Ed [mailto:reach1136@xxxx]>   > Sent: Sunday, 
    14 December 2003 7:36 AM>   > To: 
    amibroker@xxxxxxxxxxxxxxx>   > Subject: [amibroker] 
    Exrem - Buy Only>   >>   
    >>   > Somewhere I think I saw an example of using 
    the ExRem function for>   a>   > long 
    trade strategy only ->   >>   > When 
    I try to use it, as in the AFL referenc, on a Buy/Long>   
    scenario>   > only, it gives me error 
    messages.>   >>   > I did a search, 
    but can't seem to find it.  Can anyone help?>   
    >>   > Thanks EdSend 
  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. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









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.