Hi,
I don't know the author.
// PlotThickLine Example
#include <PlotThickLine.afl>
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi
%g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue(
ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorGrey50 ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color",
colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("MA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
// Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color",
colorCycle ), ParamStyle("Style") );
PlotThickLine( MA( P, Periods ), colorGreen);
_SECTION_END();
/* copy the function in the directory C:\Program
Files\AmiBroker\Formulas\Include
PlotThickLine.afl
A function which draws multiple plots very close together to
create the visual of a single very thick plot.
"Very close" is defined by an offset, which varies by symbol.
function PlotThickLine(Startpoint, DrawColor)
{
Thickness = 6 ; // set your desired thickness here
ST = Name();
Offset = 0.01; // default offset for arbitrary symbol, e.g. stocks
// Specific offsets for defined symbols
if (ST == "ER"){Offset = .001;}
if (ST == "YM"){Offset = .3;}
if ((ST == "EU") OR ST == "FG" OR ST == "AU" OR ST ==
"GB"){Offset = .000001;}
// Draw the exact plot
Plot(Startpoint, "", DrawColor, 5);
// Draw multiple extra plots to create thickness effect
for( idx = 1; idx < Thickness; idx++ ){
Plot(Startpoint + (idx * Offset), "", DrawColor, 5+4096);
// plot just above
Plot(Startpoint - (idx * Offset), "", DrawColor, 5+4096);
// plot just below
}
}
*/
tomingchen a écrit :
>
>
>
> Any way to configure AB to show 'bold' moving average line ? It is hard
> to see line on the chart.
>
> thanks.
>
>