/*
Not sure what you
want, but apart from that, there are at least 2 ways to do this:
1. (2 panes).
Plot the WMA in a separate pane directly underneath the Price pane (simplest)
2. (If same pane
preferred)
*/
Title = EncodeColor(4)+ _DEFAULT_NAME()+";
"+EncodeColor(1) + StrFormat("{{NAME}} -
{{INTERVAL}}; {{DATE}}; O=%g, H=%g, L=%g, C=%g (%.1f%%)
{{VALUES}}", O, H, L,
C, SelectedValue( ROC( C, 1 ) ) );
ScalingFactor=Param("ScalingFactor",10,1,20,0.25);
P = ParamField("Price
field",-1);// omit if only C required
WMAPeriods = Param("WMAPeriods",20,2,100,1);
WMAMin=LowestVisibleValue(WMA( C, WMAPeriods));//clamps the
lowest WMA value on the bottom of pane; Alternative: WMAMin=LowestVisibleValue(
L);
WMAMax=HighestVisibleValue(WMA( C,WMAPeriods));//Alternative:
WMAMax=HighestVisibleValue(H);
Plot(C,"C",1,64);
Plot( WMA( P,WMAPeriods ),
"WMA("+WriteVal(WMAPeriods,1.0)+")", colorBlack,5); //use if choice
between OHLC,AVG,OI and V is desired
Plot( WMA( P,WMAPeriods ),
"WMA("+WriteVal(WMAPeriods,1.0)+")", colorGreen,styleOwnScale|5,WMAMin,(WMAMax-WMAMin)*ScalingFactor);
/* use if only C
is used
Plot( WMA(
C,WMAPeriods ), "WMA("+WriteVal(WMAPeriods,1.0)+")",
colorBlack,5);
Plot( WMA(
C,WMAPeriods ), "WMA("+WriteVal(WMAPeriods,1.0)+")",
colorGreen,styleOwnScale|5,WMAMin,(WMAMax-WMAMin)*ScalingFactor);
From:
amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of rowdy358116
Sent: Wednesday, November 04, 2009 9:54 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] 20-WMA shown as a Ribbon
Hello All,
Can anyone show me how to put a 20-WMA on my charts as a ribbon on the bottom
of the chart? I find MAs on the price chart clutter it up?
Thankyou
Rowdy
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.423 / Virus Database: 270.14.45/2476 - Release Date: 11/02/09
07:51:00