correcting the repaining afl help

#1
HI ya,


i have a afl that gives repainting signal ..
is there any way that afl doesn;t do that .....

thx in advance

colorHighliter = IIf(C >= O, ColorRGB(0, 128, 0), ColorRGB(128, 0, 0));

//Price
SetBarFillColor(colorHighliter);
Plot(C, "Close", IIf(colorHighliter == ColorRGB(128, 0, 128), ColorRGB(255, 0, 255), IIf(colorHighliter == ColorRGB(128, 128, 0), ColorRGB(255, 255, 0), IIf(C > O, ColorRGB(0, 255, 0), IIf(C < O, ColorRGB(255, 0, 0), ColorRGB(255, 255, 255))))), styleCandle, Null, Null, 0, 0, 1);



_SECTION_END();

_SECTION_BEGIN("ZIG-ZAG");
P = ParamField( "ZIG Price field" );
change = Param("% change",15,0.25,25,0.25);

Color1 =(ParamColor("Slaller Elliott Wave1",colorcustom7));
Plot( zz=DEMA(Zig(P, change),1), _DEFAULT_NAME(), Color1, styleLine+styleThick) ;

Color2 =(ParamColor("Slaller Elliott Wave2",ColorRGB(195, 195, 0 )));
Plot( zz=DEMA(Zig(P, change),2), _DEFAULT_NAME(), Color2, styleLine+styleThick) ;


Buy1 = Cross(DEMA(Zig(P, change), 1), MA(Zig(P, change), 2)) OR
DEMA(Zig(P, change), 1) > MA(Zig(P, change), 2);

Sell1 = Cross(DEMA(Zig(P, change), 2), MA(Zig(P, change), 1)) OR
DEMA(Zig(P, change), 2) > MA(Zig(P, change), 1);


BuyPrice1 =ValueWhen(Buy1, (H+L)/2);
SellPrice1=ValueWhen(Sell1, (H+L)/2);


Buy1 = ExRem(Buy1,Sell1);
Sell1 = ExRem(Sell1,Buy1);



_SECTION_BEGIN("Name and Price");
FS=Param("Font Size",12,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorBlack );
GfxSetTextColor( ParamColor("Color",colorYellow) );
Hor=Param("Horizontal Position",547,1,1200,1);
Ver=Param("Vertical Position",1,1,830,1);
GfxTextOut(""+Name(), Hor+30 , 20 );
GfxTextOut(""+C, Hor+50 , 40);
_SECTION_END();


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


_SECTION_BEGIN("ZIG-ZAG1");
P1 = ParamField( "ZIG Price field" );
change1 = Param("% change1",6,0.25,25,0.25);

Color3 =(ParamColor("Larger Elliott Wave1",colorCustom11));
Plot( zz=TEMA(Zig(P1, change1),1), _DEFAULT_NAME(), Color3, styleLine+styleThick) ;

Color4 =(ParamColor("Larger Elliott Wave2",colorWhite));
//Plot( zz=TEMA(Zig(P1, change1),2), _DEFAULT_NAME(), Color4, styleLine+styleDots+styleThick) ;




if(Status("action") == actionExplore)


Filter = ( Buy OR Sell ) ;


SetOption("NoDefaultColumns", True);

AddTextColumn(Name(), " S y m b o l ");

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

_SECTION_BEGIN("AUTO SEC Version 1.2");

//--Level 3
//Kook Auto SEC
//AUTO SEC Version 1.0//
// v.1.0 Created By Kook 16 Nov 2005 //
// v.1.1 1st Update By Kook 17 Nov 2005 //
// v.1.2 2nd Update By Kook 20 Nov 2005 //Bugs(Last SEC) reported from Mink

Heading="AUTO SEC Version 1.2";

SECUpColor=ParamColor("SEC-UpColor",colorGreen);
SECDnColor=ParamColor("SEC-DownColor",colorRed);
SECLastColor=ParamColor("SEC-LastColor",10);
BckGndColor=ParamColor("BackGroundColor",colorBlack);
ZZSwitch=Param("ZZSwitch",0,0,1,1);
Sens=Param("Sens",11.5, 0.5, 15, 0.25);
SECSwitch=Param("SECSwitch",1,0,1,1);

BarPK=BarsSince(Zig(C,Sens)==Peak(C,Sens));
BarTGH= BarsSince(Zig(C,Sens)==Trough(C,Sens));
Turnpoint=Min(BarPK,BarTGH);
x = Cum(1);
lastx = ValueWhen(Turnpoint==0,( x ));
Daysback = ValueWhen(Turnpoint==0,(Max(PeakBars(C,Sens,1),TroughBars(C,Sens,1))))+1;

aa =ValueWhen(Turnpoint==0,LinRegIntercept( Close, Daysback) );
bb =ValueWhen(Turnpoint==0,LinRegSlope( Close, Daysback));
y = Aa + bb * ( x - (Lastx - DaysBack+1) );

e= ValueWhen(Turnpoint==0,StdErr(C,Daysback));
eU= y + 2*e;
eL= y - 2*e;

ColorSEC=IIf(Cross(bb,0) OR Cross(0,bb),colorBlack,IIf(bb<0,colorRose,SECUpColor));



DaysbackL = LastValue(Min(PeakBars(C,Sens,1),TroughBars(C,Sens,1)));

Slope= ValueWhen(Turnpoint==0,bb,0);
Level= ValueWhen(Turnpoint==0,aa,0);
Err= ValueWhen(Turnpoint==0,e,0);

Mback= Level + slope*( Turnpoint) ;
Uback= MBack + 2*Err;
Lback= MBack - 2*Err;

ColorSEC2=IIf(Cross(bb,0) OR Cross(0,bb),colorBlack,IIf(bb<0,SECUpColor,colorRose));




Buy = Cross(C,eU) OR C > eU;
Sell = Cross(eL,C) OR C < eU;


BuyPrice =ValueWhen(Buy, (L+L+L+H)/4);
SellPrice=ValueWhen(Sell,(L+H+H+H)/4);


Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);


if(SelectedValue(Buy))
{
StaticVarSet( "tmp", 1 );
PlaySound("C:\\Program Files\\AmiBroker\\sound\\buy.wav");
//Say("Buy ");
SetChartBkColor(ColorRGB(143,188,143));

}
if(SelectedValue(Sell))
{
StaticVarSet( "tmp", 0 );
PlaySound("C:\\Program Files\\AmiBroker\\sound\\sell.wav");
//Say("sell ");
SetChartBkColor(ColorRGB(240,128,128));
}
if(StaticVarGet("tmp")==1)
{
SetChartBkColor(ColorRGB(143,188,143));
}
else
{
SetChartBkColor(ColorRGB(240,128,128));
}

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0,L, Offset=-25);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-35);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-30);

PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorDarkRed, 0,H, Offset= 25);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0,H, Offset= 35);
PlotShapes(IIf(Sell, shapeDownArrow,shapeNone),colorWhite, 0,H, Offset=-30);


if(Status("action") == actionExplore)


Filter = ( Buy OR Sell ) | ( Buy1 OR Sell1 );


SetOption("NoDefaultColumns", True);


AddTextColumn(Name(), " S y m b o l ");


AddColumn(DateTime(), " D a t e ", formatDateTime);


AddColumn(LastValue(C),"Currant",1.0,colorBlack,colorTan);


AddColumn( IIf( Buy, BuyPrice, Null ), "Mega Buy by Larger Wave ", 1.2, textColor = colorWhite, bkgndColor = colorDarkGreen );

AddColumn( IIf( Buy1, BuyPrice1, Null ), "Buy by Smaller Wave ", 1.2, textColor = colorWhite, bkgndColor = colorGreen );


AddColumn( IIf( Sell, SellPrice, Null ), "Mega Sellby Larger Wave", 1.2, colorYellow, bkgndColor = colorViolet );

AddColumn( IIf( Sell1, SellPrice1, Null ), "Sellby Smaller Wave", 1.2, colorYellow, bkgndColor = colorBrown );

_SECTION_END();

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

_SECTION_BEGIN("In Daily 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 ) ) ));

TimeFrameSet(inDaily);
MA3 = MA(C,3);
Cl = C;
TimeFrameRestore();
MA3=(TimeFrameExpand( MA3, inDaily));
Cl=(TimeFrameExpand( Cl, inDaily));

_SECTION_END();

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

_SECTION_BEGIN("Price, Hawamer");

SetBarsRequired(sbrAll);
daynum= Now(9);//day of the week
SatSun= IIf((daynum==1 OR daynum==7),1,0);
dec= IIf(StrRight(Name(),3) == "", 3.2, 3.2);
dec= (Param("Decimals",2,0,7,1)/10)+1;
uc= ParamColor("Up Candle Fill Color",19);
dc= ParamColor("Dn Candle Fill Color",24);
nc= ParamColor("Neutral Fill Color",16);
bc= BarCount-1;
x= BarIndex();
Lx= LastValue(x);
sx= SelectedValue(x);
//==============================


_SECTION_END();

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Current Days Hi Lo //

numbars = LastValue( Cum( Status( "barvisible" ) ) );
fraction = IIf( StrRight( Name(), 3 ) == "", 3.2, 3.2 );

//THL = ParamToggle("Todays Hi Lo","Show|Hide",1);
//if(THL==1)
{
isRth = TimeNum() >= 084500 & TimeNum() <= 085959;
isdRth = TimeNum() >= 084500 & TimeNum() <= 160000;
aRthL = IIf(isRth, L, 1000000);
aRthH = IIf(isdRth, H, Null);
aRthLd = IIf(isdRth, L, 1000000);


DH = TimeFrameGetPrice( "H", inDaily );
DHI = LastValue (DH,1);
DL = TimeFrameGetPrice( "L", inDaily );
DLI = LastValue (DL,1);

PlotText(" Day Hi =" + WriteVal( DHI, fraction ), LastValue(BarIndex())+2, DHI +0.05, ColorRGB(210, 0, 0 ));
PlotText(" Day Lo =" + WriteVal( DLI, fraction ), LastValue(BarIndex())+2, DLI +0.05, colorPaleGreen);
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//Previous Days HI LO //

numbars = LastValue( Cum( Status( "barvisible" ) ) );
fraction = IIf( StrRight( Name(), 3 ) == "", 3.2, 3.2 );

DC = TimeFrameGetPrice( "C", inDaily); // close

DH = TimeFrameGetPrice( "H", inDaily );

DL = TimeFrameGetPrice( "L", inDaily );

PP = ( DL + DH + DC ) / 3;

PPI = LastValue ( PP, 1 ); // Pivot

DayH = TimeFrameGetPrice( "H", inDaily, -1 );

DayHI = LastValue ( DayH, 1 );// yesterdays high

DayL = TimeFrameGetPrice( "L", inDaily, -1 );

DayLI = LastValue ( DayL, 1 ); // yesterdays low

DayC = TimeFrameGetPrice( "C", inDaily, -1 );

DayCI = LastValue ( DayC, 1 ); // yesterdays close

DayO = TimeFrameGetPrice( "O", inDaily ); // current day open

DayH2 = TimeFrameGetPrice( "H", inDaily, -2 );

DayH2I = LastValue ( DayH2, 1 ); // Two days before high

DayL2 = TimeFrameGetPrice( "L", inDaily, -2 );

DayL2I = LastValue ( DayL2, 1 ); // Two days before low

DayH3 = TimeFrameGetPrice( "H", inDaily, -3 );

DayH3I = LastValue ( DayH3, 1 ); // Three days before high

DayL3 = TimeFrameGetPrice( "L", inDaily, -3 );

DayL3I = LastValue ( DayL3, 1 ); // Three days before low

numbars = LastValue( Cum( Status( "barvisible" ) ) );

hts = -33.5;

YHL = ParamToggle( "Yesterday HI LO", "Hide|Show", 1 );

if ( YHL == 1 )
{

Plot( DayO, "DO", colorCustom12, styleDots | styleNoLine | styleNoRescale );
// Plot( DayL, "YL", colorPaleTurquoise, styleDots | styleLine | styleNoRescale );
//Plot( DayH, "YH", colorOrange, styleDots | styleNoLine | styleNoRescale );

PlotText( " Yes Day High =" + WriteVal( DayH, fraction ), LastValue( BarIndex() ) + 1, DayHI, colorRose );
PlotText( " Yes Day Low =" + WriteVal( DayL, fraction ), LastValue( BarIndex() ) + 1, DayLI, colorPaleTurquoise );
PlotText( " Yes Day C =" + WriteVal( DayL, fraction ), LastValue( BarIndex() ) + 4, DayCI, colorWhite );
}

TDBHL = ParamToggle( "2/3Days before HI LO", "Hide|Show", 1 );

if ( TDBHL == 1 )
{
// Plot( DayL2, "2DBL", colorBrightGreen, styleDots | styleNoLine | styleNoRescale );
//Plot( DayH2, "2DBH", colorRed, styleDots | styleNoLine | styleNoRescale );
//Plot( DayL3, "3DBL", colorGreen, styleDots | styleNoLine | styleNoRescale );
//Plot( DayH3, "3DBH", colorViolet , styleDots | styleNoLine | styleNoRescale );

//PlotText( " 1DB Hi =" + WriteVal( DayH2, fraction ), LastValue( BarIndex() ) - 3, DayH2I, colorPink );
//PlotText( " 1DB Lo =" + WriteVal( DayL2, fraction ), LastValue( BarIndex() ) - 3, DayL2I, colorBrightGreen );
//PlotText( " 2DB Hi =" + WriteVal( DayH3, fraction ), LastValue( BarIndex() ) - 3, DayH3I, colorViolet );
//PlotText( " 2DB Lo =" + WriteVal( DayL3, fraction ), LastValue( BarIndex() ) - 3, DayL3I, colorGreen );
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Title =

"\n" +

EncodeColor( colorBlack ) + //Date() + "\n" + "\n" +
EncodeColor( colorWhite) + "////Day O " + EncodeColor(colorWhite) + O +
EncodeColor( colorViolet) + "////Day H " + EncodeColor(colorViolet) + DHI +
EncodeColor( colorPaleGreen) + "////Day L " + EncodeColor(colorPaleGreen) + DLI +
EncodeColor( colorYellow) + "////Day C " + EncodeColor(colorYellow) + C + "\n" + "\n" +
EncodeColor( colorWhite ) + "////Yes Day Close= " + EncodeColor( colorWhite ) + DayCI + "\n" + "\n" +
EncodeColor( colorBrightGreen ) + "////2DB Hi= " + EncodeColor( colorBrightGreen ) + DayH3I +
EncodeColor( colorPink ) + "////1DB Hi= " + EncodeColor( colorRed ) + DayH2I +
EncodeColor( colorRose ) + "////Yes Day Hi= " + EncodeColor( colorRose) + DayHI + "\n" + "\n" +
EncodeColor( colorRed ) + "////2DB Lo= " + EncodeColor( colorYellow ) + DayL3I +
EncodeColor( colorBrightGreen )+ "////1DB Lo= " + EncodeColor( colorBrightGreen ) + DayL2I +
EncodeColor( colorPaleTurquoise )+ "////Yes Day Lo= " + EncodeColor( colorPaleTurquoise) + DayLI ;

/////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
_SECTION_BEGIN( "Magnified Market Price" );
//by Vidyasagar, [email protected]//
FS = Param( "Font Size", 15, 11, 100, 1 );
GfxSelectFont( "Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor( "Color", colorWhite ) );
Hor = Param( "Horizontal Position", 604, 1, 1200, 1 );
Ver = Param( "Vertical Position", 56, 1, 830, 1 );
GfxTextOut( "" + C, Hor , Ver );
GfxTextOut( Name(), Hor, Ver-50 );
GfxSetTextColor( ParamColor( "ColorY", colorWhite ) );
GfxTextOut( "" + V, Hor , Ver + 45 );
YC = TimeFrameGetPrice( "C", inDaily, -1 );
DD = Prec( C - YC, 2 );
xx = Prec( ( DD / YC ) * 100, 2 );
GfxSelectFont( "Times New Roman", 20, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor( "Color", colorRed ) );
GfxTextOut( "" + DD + " (" + xx + "%)", Hor , Ver + 90 );

_SECTION_END();*/

/////////////////////////////////////////////

_SECTION_BEGIN( "AA - Fibonacci Retracements and Goals" );
///////////////////////////////////////////////////
// **************** Parameters ********************
//
Period = Param( "Period", 5.00, 0.25, 50, 0.25 );
ShowExt = ParamToggle( "Show Extension ?", "No|Yes", 0 );
///////////////////////////////////////////////////
// **************** Calculations *****************
//
Period = Period * ( 13 * .618 );

Hhb = LastValue( Ref( HHVBars( H, Period ), -1 ) ) + 1;
Llb = LastValue( Ref( LLVBars( L, Period ), -1 ) ) + 1;
Hv = LastValue( Ref( HHV( H, Period ), -1 ) );
Lv = LastValue( Ref( LLV( L, Period ), -1 ) );

Range = ( Hv - Lv );
LText = "0 %, 23.6 %, 38.2 %, 50 %, 61.8 %, 78.6 %, 100 %, 1.618 %, 1.72 %, 200 %";

if ( Hhb > Llb )
{
Levels[0] = Lv;
Levels[1] = ( Range * .236 ) + Levels[0];
Levels[2] = ( Range * .382 ) + Levels[0];
Levels[3] = ( Range * .5 ) + Levels[0];
Levels[4] = ( Range * .618 ) + Levels[0];
Levels[5] = ( Range * .786 ) + Levels[0];
Levels[6] = Hv;
Levels[7] = ( Range * .618 ) + Levels[6];
Levels[8] = ( Range * .72 ) + Levels[6];
Levels[9] = ( Range ) + Levels[6];
x0 = BarCount - 1 - Llb;
x1 = BarCount - 1 - Hhb;
}
else
{
Levels[0] = Hv;
Levels[1] = Levels[0] - ( Range * .236 );
Levels[2] = Levels[0] - ( Range * .382 );
Levels[3] = Levels[0] - ( Range * .5 );
Levels[4] = Levels[0] - ( Range * .618 );
Levels[5] = Levels[0] - ( Range * .786 );
Levels[6] = Lv;
Levels[7] = Levels[6] - ( Range * .618 );
Levels[8] = Levels[6] - ( Range * .72 );
Levels[9] = Levels[6] - ( Range * 1.0 );
x0 = BarCount - 1 - Hhb;
x1 = BarCount - 1 - Llb;
}

//////////////////////////////////////////////////////////////////////////////////////
/// **************************** Plotting Area ********************************
//

for ( i = 0; i < 10; i++ )
{
if ( i != 6 )
x = x0;
else
x = x1;

if ( i < 7 OR ShowExt )
{
//fix Plot( LineArray( x, Levels, BarCount, Levels ), "", i + 2, styleDots );
PlotText( StrExtract( LText, i ), BarCount, Levels, i + 2 );
}
}

///////////////////////////////////////////////////////////////////////////////////////////////


//ESSENTIAL TRADER TOOLS//
// Compiled by K.Vidyasagar, [email protected] //
//Previous Days HI LO //

DayH = TimeFrameGetPrice("H", inDaily, -1); DayHI = LastValue (DayH,1);// yesterdays high
DayL = TimeFrameGetPrice("L", inDaily, -1); DayLI = LastValue (DayL,1); // yesterdays low
DayC = TimeFrameGetPrice("C", inDaily, -1); // yesterdays close
DayO = TimeFrameGetPrice("O", inDaily); // current day open
WeekH= TimeFrameGetPrice("H", inWeekly, 1); WeekHI = LastValue (WeekH,1); // One Week before high
WeekL= TimeFrameGetPrice("L", inWeekly, 1); WeekLI = LastValue (WeekL,1); // One Week before low
MonthH= TimeFrameGetPrice("H", inMonthly, 1); MonthHI = LastValue (MonthH,1); // One Month before high
MonthL= TimeFrameGetPrice("L", inMonthly, 1); MonthLI = LastValue (MonthL,1); // One Month before low

numbars = LastValue(Cum(Status("barvisible")));
hts = -33.5;


TDBHL = ParamToggle("Week And Month HI LO","Hide|Show",1);
if(TDBHL==1) {
// Plot(WeekL,"WeekL",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
// Plot(WeekH,"WeekH",colorOrange,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
// Plot(MonthL,"MonthL",colorTurquoise,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
// Plot(MonthH,"MonthH",colorOrange,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
PlotText(" WeekH " , LastValue(BarIndex())-(numbars/Hts), WeekHI, colorOrange);
PlotText(" WeekL " , LastValue(BarIndex())-(numbars/Hts), WeekLI, colorTurquoise);
PlotText(" MonthH " , LastValue(BarIndex())-(numbars/Hts), MonthHI, colorOrange);
PlotText(" MonthL " , LastValue(BarIndex())-(numbars/Hts), MonthLI, colorTurquoise);
}

// Pivot Levels //
PP = (DayL + DayH + DayC)/3; PPI = LastValue (PP,1); // Pivot
R1 = (PP * 2) - DayL; R1I = LastValue (R1,1); // Resistance 1
S1 = (PP * 2) - DayH; S1I = LastValue (S1,1); // Support 1
R2 = PP + R1 - S1; R2I = LastValue (R2,1); // Resistance 2
S2 = PP - R1 + S1; S2I = LastValue (S2,1); // Support 2
R3 = PP + R2 - S1; R3I = LastValue (R3,1); // Resistance 3
S3 = PP - R2 + S1; S3I = LastValue (S3,1); // Support 3

ppl = ParamToggle("Pivot Levels","Hide|Show",1);
if(ppl==1) {
//Plot(PP, "PP",colorAqua,styleThick|styleNoRescale|styleNoTitle);
// Plot(R1, "R1",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
// Plot(S1, "S1",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
// Plot(R2, "R2",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
// Plot(S2, "S2",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
// Plot(R3, "R3",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
// Plot(S3, "S3",colorViolet,styleDots|styleNoLine|styleNoRescale|styleNoTitle);

PlotText(" Pivot ", LastValue(BarIndex())-(numbars/Hts), PPI, colorYellow);
PlotText(" R1 " , LastValue(BarIndex())-(numbars/Hts), R1I, colorViolet);
PlotText(" S1 " , LastValue(BarIndex())-(numbars/Hts), S1I, colorViolet);
PlotText(" R2 " , LastValue(BarIndex())-(numbars/Hts), R2I, colorViolet);
PlotText(" S2 " , LastValue(BarIndex())-(numbars/Hts), S2I, colorViolet);
PlotText(" R3 " , LastValue(BarIndex())-(numbars/Hts), R3I, colorViolet);
PlotText(" S3 " , LastValue(BarIndex())-(numbars/Hts), S3I, colorViolet);
}


_SECTION_BEGIN("Long MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 100, 2, 400, 1 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorBrightGreen ), ParamStyle("Style", styleThick | styleNoLabel ) | styleNoRescale );
_SECTION_END();



_SECTION_BEGIN("fLong MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 12, 2, 400, 1 );
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorblue ), ParamStyle("Style", styleThick | styleNoLabel ) | styleNoRescale );
_SECTION_END();

 
Thread starter Similar threads Forum Replies Date
S General Trading & Investing Chat 1
OneThatGotAway AmiBroker 1

Similar threads