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

[amibroker] Arc drawing tool problem



PureBytes Links

Trading Reference Links

hi,

you have the AddToComposite function that may count occurrences of the WHOLE data array. If you put this in a symbol for instance ~COUNT and then run SUM(~COUNT, 10) this would give you the occurrences over the last 10 days.

So,

AddToComposite( IIf(Close < Ref( Close, -1 ) AND V > Ref(V,-1),1, 0 )),"~COUNT","V");

this counts the occurrences and puts them into the symbol ~COUNT. Then you get the symbol using:

tt = FOREIGN("~COUNT","V");

and you may plot the number of occurrences over the past 10 days using:

Plot(SUM(tt,10),"",colorBlue,1);


another option is to use static variables (but I have not much experience with them yet)

rgds, Ed


  ----- Original Message ----- 
  From: vepardue 
  To: amibroker@xxxxxxxxxxxxxxx 
  Sent: Wednesday, August 18, 2004 4:54 AM
  Subject: [amibroker] Count function in Amibroker?


  I am trying to code the distribution days outlined by O'Neil in his 
  book, and I seem to remember it being discussed here some time ago, 
  but could not find it with a search.

  Anyway, what I am wondering, is how do you write the code for 3 
  occurrences (or more) of your variable over the last 10 bars?

  I have everything except for trying to code 3 distribution days over 
  the previous 10 bars.  And I am wondering if there is a "count" 
  function in Amibroker that I have overlooked from the 
  documentation.  Any help is greatly appreciated!!


  Distribution = IIf( (Close < Ref( Close, -1 ) AND V > Ref(V,-1) ), 
  colorRed, colorBlue );

  Plot( Volume , "Volume", Distribution , styleLeftAxisScale | 
  styleHistogram | styleThick );




  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/