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

Re: [amibroker] Relative Volume by time



PureBytes Links

Trading Reference Links

Etoke,

The approach I would take would be a double loop.  You need to create  
a new array with the averages.  Make sure that the quote arrays are  
padded so that all the bar times are represented.  You would loop  
through for each of the bars in a day, with another loop that creates  
a moving average of all the nth bars.  "n" is one days worth of bars.   
A formula for doing a MA in a loop was presented a few days ago.

There might be other variations on this theme.

BR,
Dennis



On May 4, 2009, at 2:20 PM, etoketrader wrote:

> Hi everybody,
>
> I am trying to create a relative volume indicator which would plot a  
> volume bar relative to it's moving average by timeframe.
>
> If this is done across all timeframes, then the code would be very  
> simple.. for example :
>
> RelativeVol = V - MA(V,20)
>
> However what I am looking for is to be able to compare the current  
> volume with the MA of the equivalent bar of the same time, so for  
> example the Volume of the 9:30 bar is compared to the moving average  
> of the 9:30 bars of the previous 20 days.
>
> Is there a straightforward method of coding this?
>
> thanks!
> etoke
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>



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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/