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

[amibroker] volume calculation -help needed



PureBytes Links

Trading Reference Links

hi all, I am new to this group and I am not good in programming. I 
tried to write MA5 ema35 based volume chart.But the desired result 
are not yet. What I need that I want days  sum green volume and days 
sum red volume and the diffrence therin.Here is the afl.Kindly help 
me .

_SECTION_BEGIN( "Intraday VOLUME MA3 35");
SetChartOptions(0,chartShowArrows|chartShowDates);
MA2=MA(Close,5);
MA3=EMA(Close,35);

VMA5=MA2*Volume;
VMA6=MA3*Volume;
Plot(VMA5,"",IIf
(VMA5>VMA6,colorGreen,colorRed),styleHistogram|styleThick);
Plot(VMA6,"",IIf
(VMA6>VMA5,colorRed,colorGreen),styleHistogram|styleThick);


Plot(VMA5,"",IIf(VMA5>VMA6,colorGreen,colorRed),styleLine);
Plot(VMA6,"",IIf(VMA6>VMA5,colorRed,colorGreen),styleLine);

power=VMA5-VMA6;
BuyPower=power+VMA6;
SellPower=power-Vma5;
BOP=Buypower+Sellpower;


Title="\n>>Balance Of Power:\n" +
WriteIf(Buypower,"BullPower=","")
+WriteIf(Buypower,WriteVal(Buypower),"")+
WriteIf(Sellpower,"BearPower=","")
+WriteIf(Sellpower,WriteVal(Sellpower),"")+
WriteIf(BOP,"Balance Of Power=","")
+WriteIf(BOP,WriteVal(BOP),"");



Please note that this group is for discussion between users only.

To get 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/