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

Re: [amibroker] AFL for BarsSince in 5 Min chart



PureBytes Links

Trading Reference Links

oeps forgot something:

// set the timeframe to days
TimeFrameset( inDaily);
pp = Day();

// go back to your 5 minute chart
TimeFrameRestore();
pp = TimeFrameExpand(pp, inDaily, mode = expandFirst);
kk = pp - Ref(pp, -1);
writeval(barssince(kk));



ed

  ----- Original Message ----- 
  From: ed nl 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Saturday, November 06, 2004 8:26 PM
  Subject: Re: [amibroker] AFL for BarsSince in 5 Min chart


  this is also a way to do it:


  // set the timeframe to days
  TimeFrameset( inDaily);
  pp = Day();

  // go back to your 5 minute chart
  TimeFrameRestore();
  kk = pp - Ref(pp, -1);
  writeval(barssince(kk));


  now you see that if you click on the first bar of the day it gives you a 0, de second bar prints a 1 etc.

  rgds, Ed



    ----- Original Message ----- 
    From: Greg 
    To: amibroker@xxxxxxxxxxxxxxx 
    Sent: Saturday, November 06, 2004 7:40 PM
    Subject: [amibroker] AFL for BarsSince in 5 Min chart



    Can someone help. I would like to calculate the number of Bars (in a 
    5 minute chart) since the beginning of the trading day (for a stock). 
    This is what I have come up with - DDD=BarsSince(TimeNum()==73000 OR 
    TimeNum()==73500 );This almost works but there are times when results 
    are wrong. Thanks for your time.






    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]



  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 --------------------~--> 
$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/