Nees AFl With Close Open Position

#1
Dear Friend
I need Some modification in following AFL . (1) I need Signal of Close all Open position its can b Buy or sell at last Minuit of Market Closing Time For NSE(3.30Pm),MCX(11.30pm) can also modify ,Signals also should be catch in beck test of Amibroker.(2) It's About calculation which can i see on chart it's Total number Of Trade Signal From Past all data and Total Sum Of Profit and loss From past all Trade like

Total Trade Signal (count trade From all data) = " ___ "
Net Profit/loss(From Previous all Trade ) = '' _____"



_SECTION_BEGIN("wma cross buy sell ");
// macrosssystem.afl

// using weighted moving average

// set up the leagths for the moving averges

Length1 = Param("length1",21,2,200,2);

// the moving average calculations

WMA1 = WMA(C,Length1);
Plot(WMA1,"wma1",colorBlue,styleLine);// the buy and sell logic

// buy when Price crosses from below wma1 to above wma2.
Buy = Cross(C,WMA1);
Sell = Cross(WMA1,C);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(shape, IIf(Buy,colorGreen,colorRed), 0,
IIf(Buy,Low,High));
_SECTION_END();
_SECTION_BEGIN("Price1");
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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

_SECTION_END();

Please If Any one can It then please help me if possible then please Give this code in diffrent section so i can use it to other AFL Also
 

Similar threads