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

Re: [amibroker] Bars since Buy signal - how to code in AFL ?



PureBytes Links

Trading Reference Links

Hi Owen,

Isn't it simply a matter of using a true condition for Buy (Buy == 1, or Buy > 0), and then using a command line such as Exit = Iif (BarsSince (Buy>0), 1, 0);

Or create an array named buy, or long, or something like that... then if the array is either 0 or 1, the problem's solved (I think).

Or perhaps I'm missing the real problem with using BarsSince in this approach... hey, I'm sort of a newbie, so cut me some slack if I'm totally missing the point... : )

DC
  ----- Original Message ----- 
  From: Owen Davies 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Sunday, October 31, 2004 6:55 PM
  Subject: Re: [amibroker] Bars since Buy signal - how to code in AFL ?


  Anthony Faragasso wrote:

  >Owen,
  >
  >Could it be written as a function:
  >
  That is the only way I can see to do it, but the task is beyond me.  
  That's why I keep goosing Tomasz every six or ten months.  It's a 
  function I really believe should be built in.

  Owen


  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. 





------------------------------------------------------------------------------

  Message transport security by GatewayDefender
  6:55:53 PM ET - 10/31/2004

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



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/