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

[amibroker] Re: code for MA (volume)



PureBytes Links

Trading Reference Links

Okay,  I figured it out. 

After a little digging in the help file - Yes the answer was in the
help file imagine that.  I came across the section that discussed
using the parameter styleownscale and attaching to that it's own
minimum and maximum values for it's own scale.  

Since we want two different scales - one for the price and it's moving
averages and another one for the volume and it's moving average, it
made sense that I needed to apply the MA of the volume to the "volume
scale".

Figuring out how to specify that particular scale was the issue.  The
trick is in the little piece of code - "styleOwnScale, 0 , Maximum"

So here is the revised section of code for the "Volume":

_SECTION_BEGIN("Volume");
Maximum = LastValue( Highest( Volume ) );
VolPer = Param("Vol MA Per", 100, 2, 200, 1 );
Plot( MA( Volume, VolPer ), "MA volume", colorRed, styleLine |
styleOwnScale, 0 , Maximum );
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorBlue ),
styleNoTitle | styleHistogram | styleOwnScale, 0 , Maximum );
_SECTION_END();


Later,

Dave
MarketMonk777
a.k.a. RedEyes


--- In amibroker@xxxxxxxxxxxxxxx, "marketmonk777" <dlittner@xxx> wrote:
>
> Hi Graham,
> 
> I thought it would be that easy as well but it doesn't work for me.  I
> thought Rajneesh had a simple pane with volume in it and then all he
> would have to do is a drag and drop.
> 
> But it turns out that the All in One code has something going on in it
> that prevents this simple little operation.  What happens to me is
> that when I drag the simple moving average code onto that window a
> parameters box pops up and when I select volume, poof the price chart
> with the other moving averages and the BBs disappear.
> 
> For the life of me I have tried every combination possible and can't
> get this to work.
> 
> All we would like to see is a simple moving average applied to the
> volume histogram on the same scale as the volume bars.   The closest I
> have gotten it to work is that the Vol MA (as I call it) is on it's
> own scale but does not match that of the volume bars.
> 
> It's got me stumped, and though it doesn't take much effort to do that
> - I did give it my best shot.
> 
> Dave
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> >
> > to add MA volume to price-all-in one just drag and drop MA AFL into
> the chart
> > The parameters window should show and you select volume for the new MA
> > 
> > --
> > Cheers
> > Graham
> > AB-Write >< Professional AFL Writing Service
> > Yes, I write AFL code to your requirements
> > http://e-wire.net.au/~eb_kavan/ab_write.htm
> > 
> > 
> > On 2/19/06, rajneesh_dak <rajneesh_dak@> wrote:
> > > -friend ! i want to overlay this on all in one price chart.over
> > > volume histogram chart.rajneesh.
> > > note -  plot is displayed over whole screen
> > > -- In amibroker@xxxxxxxxxxxxxxx, "Dave's Laptop" <dlittner@>
> > > wrote:
> > > >
> > > > Hi Rajneesh,
> > > >
> > > > Here is the code that I use to plot Volume, MA Volume and OBV in
> > > the same
> > > > pane:
> > > >
> > > > _SECTION_BEGIN("Volume");
> > > > Plot( Volume, _DEFAULT_NAME(), IIf( C > Ref(C,-1), ParamColor("Up
> > > Color",
> > > > colorGreen ), ParamColor("Down Color", colorRed ) ), ParamStyle
> > > ( "Style",
> > > > styleHistogram | styleThick, maskHistogram  ) );
> > > > _SECTION_END();
> > > >
> > > > _SECTION_BEGIN("OBV");
> > > > Plot( OBV(), _DEFAULT_NAME(), ParamColor("Color", colorCycle ),
> > > > ParamStyle("Style")  );
> > > > _SECTION_END();
> > > >
> > > > _SECTION_BEGIN("MA");
> > > > MP = IIf( Interval()==inWeekly, 10, 50 );
> > > > Plot( MA( V, MP ), "VMA(" + MP + ")", ParamColor( "Color",
> > > colorCycle ),
> > > > ParamStyle("Style") );
> > > > _SECTION_END();
> > > >
> > > >
> > > > As you can see I also change the Moving average calculation from
> > > 50 days to
> > > > 10 weeks depending on the time frame of the chart (thanks to the
> > > help of
> > > > Graham and others).
> > > >
> > > > Dave
> > > >
> > > > -----Original Message-----
> > > > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> > > On Behalf
> > > > Of rajneesh_dak
> > > > Sent: Saturday, February 18, 2006 9:12 AM
> > > > To: amibroker@xxxxxxxxxxxxxxx
> > > > Subject: [amibroker] code for MA (volume)
> > > >
> > > > hi,
> > > > how can i add ma(volume) for volume in price chartover volume.
> > > > rajneesh
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 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 other support material please check also:
> > > > http://www.amibroker.com/support.html
> > > >
> > > >
> > > > Yahoo! Groups Links
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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 other support material please check also:
> > > http://www.amibroker.com/support.html
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

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