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

RE: [amibroker] How to code "Take only first signal of the day"?



PureBytes Links

Trading Reference Links

A bit clumsy but this might get you started:

NewDay = DateNum() != Ref(DateNum(),-1);
BuyNum = Cum(Buy);
DailyBuyNum = BuyNum - ValueWhen(NewDay,BuyNum);
Plot(DailyBuyNum,"DBN",1,styleStaircase); // test only
Buy = Buy AND (DailyBuyNum == 1); // change the "1' to the trade number you
want to take

herman

  -----Original Message-----
  From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx]
  Sent: Sunday, October 03, 2004 7:14 PM
  To: amibroker@xxxxxxxxxxxxxxx
  Subject: RE: [amibroker] How to code "Take only first signal of the day"?


  I don't quite know what you mean by take the first signal, if you have a
buy
  signal then you will get a buy showing on the first signal for
backtesting.
  For scans and explorations then add the line Buy=exrem(buy,sell); to
remove
  subsequent buy signals

  Cheers,
  Graham
  http://e-wire.net.au/~eb_kavan/

  -----Original Message-----
  From: quexos0 [mailto:quexos0@xxxxxxxxxxxx]
  Sent: Sunday, October 03, 2004 10:03 PM
  To: amibroker@xxxxxxxxxxxxxxx
  Subject: [amibroker] How to code "Take only first signal of the day"?



  Hi guys, 2nd time with this question...

  How do u code "take only first signal of the day" like in the Trend
  Following with Parabolic SAR system on moneytec where the guy took
  only the first signal?






  Check AmiBroker web page at:
  http://www.amibroker.com/

  Check group FAQ at:
  http://groups.yahoo.com/group/amibroker/files/groupfaq.html
  Yahoo! Groups Links








  Check AmiBroker web page at:
  http://www.amibroker.com/

  Check group FAQ at:
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:
    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.



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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:
    http://docs.yahoo.com/info/terms/