+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

Crossover Buy Sell Signal

Enhance crossover-based trading signals with Amibroker AFL and Amibroker Data Feeder. These tools empower traders to identify and act on buy and sell signals generated by indicator crossovers. Integrating these tools refines signal accuracy, aiding traders in making informed decisions and potentially achieving better trading outcomes.

//  macrosssystem.afl
//
//  the classic moving average crossover
//  using weighted moving average
//

//  set up the leagths for the moving averges
SetChartBkGradientFill( ParamColor("Inner panel upper",colorBlack),ParamColor("Inner panel lower",colorBlack));

Length1 = Param("length1",3,1,81,2);
Length2 = Param("length2",13,2,200,2);

//  the moving average calculations
WMA1 = WMA(C,Length1);
WMA2 = WMA(C,Length2);
SMA1= MA(C,45);
//  the buy and sell logic
//  buy when wma1 crosses from below wma2 to above wma2.
Buy = Cross(WMA1,WMA2);
Sell = Cross(WMA2,WMA1);

Short = Sell;
Cover = Buy;

//  compute the equity for the single ticker
e = Equity();
Maxe = LastValue(Highest(e));
Plot(Close, "price",colorBrightGreen,styleCandle );

//  plot the wma lines.
Plot(WMA1,"wma1",colorGreen,styleLine);
Plot(WMA2,"wma2",colorBlue,styleLine);
Plot(SMA1,"",colorAqua,styleLine);
//  plot the buy and sell arrows.
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(shape, IIf(Buy,colorAqua,colorRed), 0,IIf(Buy,Low,High));

//  plot the equity curve
Plot(e,"equity",colorBlue,styleLine|styleOwnScale,0,Maxe);
Plot(10000,"",colorBlue,styleLine|styleOwnScale,0,Maxe);
GraphXSpace = 5;

_SECTION_BEGIN("Keltner Bands");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");

CenterLine = MA( P, Periods );
KTop   = CenterLine + Width * ATR( Periods );
KBot = CenterLine - Width * ATR( Periods );

Plot( KTop, "KBTop" + _PARAM_VALUES(), Color, Style ); 
Plot( KBot, "KBBot" + _PARAM_VALUES(), Color, Style ); 
_SECTION_END();

Open chat
1
Hi, how can I help you?