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

[amibroker] Splitting Volume Value



PureBytes Links

Trading Reference Links

Hello All,

Can anyone offer some guidence/assistance with this please.

When looking at a WEEKLY Timeframe, the volume line plotted is 
obviously the total volume made up from the corresponding 5 Days 
taken from the lower timeframe (Daily).


However, what I would like to do is plot 3 lines for Volume on the 
WEEKLY Timeframe. 

The 1st line would be the total volume over the last 5 Days (taken 
from Daily Timeframe) where the Close for each of the Daily Bars was 
HIGHER or EQUAL to its Open.

The 2nd line would be the total volume over the last 5 Days (taken 
from Daily Timeframe) where the Close for each of the Daily Bars was 
LOWER than the Open.

The 3rd line would simply be the total of the values from Lines 1 & 
2. In otherwords, it would simply be the same value as the normal 
Weekly Volume.

The 3 lines would be plotted on the Weekly Timeframe.


I've been playing around with the TimeFrameSet function in AB in an 
attempt to achieve this but with little success. 

Here is the code I have so far:

TimeFrameSet(inDaily);
upvolume = IIf(C>=O,V,0);
downvolume = IIf(C<O,V,0);
upvolume = Sum(upvolume,5);
downvolume = Sum(downvolume,5);
TotalV = upvolume + downvolume ;
TimeFrameRestore();
Plot( TotalV, " Total Volume", colorBlue, ParamStyle("Style", 
styleHistogram | styleThick, maskHistogram ) );

When the above code is plotted, the result for the most recent volume 
bar on a DAILY timeframe is the SAME value as the value for the most 
recent standard Volume Bar on a WEEKLY timeframe !!! 

However, what I need to do is plot the result from the Daily 
timeframe onto the Weekly Timeframe, so both volume values are the 
same.


Consequently, any help would be appreciated,

Many Thanks in advance,

Chorlton 


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

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

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

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

For other support material please check also:
http://www.amibroker.com/support.html

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