Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Concencus of Common Traditional Indicators, Trading System By Sosrodiningrat @2017 for Amibroker (AFL)

Rating:
3 / 5 (Votes 3)
Tags:
trading system, optimize, ambroker

Concencus of Common Traditional Indicators with buy, sell and can optimize the value.
Just for educational purpose, not for real trading.

By Sosrodiningrat @2017

Screenshots

Indicator / Formula

Copy & Paste Friendly
//Concencus of Common Traditional Indicators by Sosrodiningrat @2017
//Feature: Buy, Sell, Optimize
OptimizerSetEngine("spso");OptimizerSetOption("Runs",1);OptimizerSetOption("MaxEval",1000);
function ParamOptimize(description,defaultVal,minv,maxv,step){return Optimize(description,Param(description,defaultVal,minv,maxv,step),minv,maxv,step);}//parameter and optimizer

SetBarsRequired(sbrAll,-1);

Plot(C,"",colorBlack,styleCandle);

display=ParamToggle("Display","OFF|ON",1);

indi01=LinRegSlope(ADX(ParamOptimize("ADX",14,1,100,1)),2);
indi02=LinRegSlope(ATR(ParamOptimize("ATR",7,1,100,1)),2);
indi03=LinRegSlope(BBandTop(C,ParamOptimize("BBTopPeriod",14,1,100,1),ParamOptimize("BBTopDev",2,0.1,6,0.1)),2);
indi04=LinRegSlope(BBandBot(C,ParamOptimize("BBBotPeriod",14,1,100,1),ParamOptimize("BBBotDev",2,0.1,6,0.1)),2);
indi05=LinRegSlope(CCI(ParamOptimize("CCI",14,1,100,1)),2);
indi06=LinRegSlope(Chaikin(ParamOptimize("Chaikin",9,1,9,1),ParamOptimize("BBBotPeriod",14,10,20,1)),2);
indi07=LinRegSlope(MACD(12,26),2);
indi08=LinRegSlope(Signal(12,26,9),2);
indi09=LinRegSlope(MDI(ParamOptimize("MDI",14,1,100,1)),2);
indi10=LinRegSlope(MFI(ParamOptimize("MFI",14,1,100,1)),2);
indi11=LinRegSlope(NVI(),2);
indi12=LinRegSlope(OBV(),2);
indi13=LinRegSlope(OscP(ParamOptimize("OscP1",9,1,17,1),ParamOptimize("OscP2",18,18,30,1)),2);
indi14=LinRegSlope(OscV(ParamOptimize("OscV1",9,1,17,1),ParamOptimize("OscV2",18,18,30,1)),2);
indi15=LinRegSlope(PDI(ParamOptimize("PDI",14,1,100,1)),2);
indi16=LinRegSlope(PVI(),2);
indi17=LinRegSlope(RMI(20,5),2);
indi18=LinRegSlope(ROC(C,ParamOptimize("ROC",12,1,100,1)),2);
indi19=LinRegSlope(RSI(ParamOptimize("RSI",5,1,100,1)),2);
indi20=LinRegSlope(RWI(5,30),2);
indi21=LinRegSlope(RWIHi(5,30),2);
indi22=LinRegSlope(RWILo(5,30),2);
indi23=LinRegSlope(SAR(0.02,0.2),2);
indi24=LinRegSlope(StochD(14,3,3),2);
indi25=LinRegSlope(StochK(14,3),2);
indi26=LinRegSlope(Trix(ParamOptimize("Trix",5,1,100,1)),2);
indi27=LinRegSlope(Ultimate(7,14,28),2);
indi28=LinRegSlope(DEMA(C,ParamOptimize("DEMA",5,1,100,1)),2);
indi29=LinRegSlope(EMA(C,ParamOptimize("EMA",5,1,100,1)),2);
indi30=LinRegSlope(MA(C,ParamOptimize("MA",5,1,100,1)),2);
indi31=LinRegSlope(TEMA(C,ParamOptimize("TEMA",5,1,100,1)),2);
indi32=LinRegSlope(Wilders(C,ParamOptimize("Wilders",10,1,100,1)),2);
indi33=LinRegSlope(WMA(C,ParamOptimize("WMA",5,1,100,1)),2);

printf("\nADX= "+WriteIf(indi01>0,"UP",WriteIf(indi01<0,"DOWN","SIDEWAYS")));
printf("\nATR= "+WriteIf(indi02>0,"UP",WriteIf(indi02<0,"DOWN","SIDEWAYS")));
printf("\nBBandTop= "+WriteIf(indi03>0,"UP",WriteIf(indi03<0,"DOWN","SIDEWAYS")));
printf("\nBBandBot= "+WriteIf(indi04>0,"UP",WriteIf(indi04<0,"DOWN","SIDEWAYS")));
printf("\nCCI= "+WriteIf(indi05>0,"UP",WriteIf(indi05<0,"DOWN","SIDEWAYS")));
printf("\nChaikin= "+WriteIf(indi06>0,"UP",WriteIf(indi06<0,"DOWN","SIDEWAYS")));
printf("\nMACD= "+WriteIf(indi07>0,"UP",WriteIf(indi07<0,"DOWN","SIDEWAYS")));
printf("\nSignal= "+WriteIf(indi08>0,"UP",WriteIf(indi08<0,"DOWN","SIDEWAYS")));
printf("\nMDI= "+WriteIf(indi09>0,"UP",WriteIf(indi09<0,"DOWN","SIDEWAYS")));
printf("\nMFI= "+WriteIf(indi10>0,"UP",WriteIf(indi10<0,"DOWN","SIDEWAYS")));
printf("\nNVI= "+WriteIf(indi11>0,"UP",WriteIf(indi11<0,"DOWN","SIDEWAYS")));
printf("\nOBV= "+WriteIf(indi12>0,"UP",WriteIf(indi12<0,"DOWN","SIDEWAYS")));
printf("\nOscP= "+WriteIf(indi13>0,"UP",WriteIf(indi13<0,"DOWN","SIDEWAYS")));
printf("\nOscV= "+WriteIf(indi14>0,"UP",WriteIf(indi14<0,"DOWN","SIDEWAYS")));
printf("\nPDI= "+WriteIf(indi15>0,"UP",WriteIf(indi15<0,"DOWN","SIDEWAYS")));
printf("\nPVI= "+WriteIf(indi16>0,"UP",WriteIf(indi16<0,"DOWN","SIDEWAYS")));
printf("\nRMI= "+WriteIf(indi17>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nROC= "+WriteIf(indi18>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nRSI= "+WriteIf(indi19>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nRWI= "+WriteIf(indi20>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nRWIHi= "+WriteIf(indi21>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nRWILo= "+WriteIf(indi22>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nSAR= "+WriteIf(indi23>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nStochD= "+WriteIf(indi24>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nStochK= "+WriteIf(indi25>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nTrix= "+WriteIf(indi26>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nUltimate= "+WriteIf(indi27>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nDEMA= "+WriteIf(indi28>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nEMA= "+WriteIf(indi29>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nMA= "+WriteIf(indi30>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nTEMA= "+WriteIf(indi31>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nWilders= "+WriteIf(indi32>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));
printf("\nWMA= "+WriteIf(indi33>0,"UP",WriteIf(indi17<0,"DOWN","SIDEWAYS")));

allindi=indi01+indi02+indi03+indi04+indi05+indi06+indi07+indi08+indi09+indi10+indi11;
allindi=allindi+indi12+indi13+indi14+indi15+indi16+indi17+indi18+indi19+indi20+indi21;
allindi=allindi+indi22+indi23+indi24+indi25+indi26+indi27+indi28+indi29+indi30+indi31;
allindi=allindi+indi32+indi33;

per=ParamOptimize("AllIndi",72,2,200,1);
Buy=LinRegSlope(allindi,per)>0;
Sell=LinRegSlope(allindi,per)<0;
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);


printf("\n\nAllIndicators= "+WriteIf(allindi>0,"UP",WriteIf(allindi<0,"DOWN","SIDEWAYS")));

//====================================
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue,0,L,-12);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,-12);
//====================================
if(display==1)
{
GfxSetOverlayMode(1);
GfxSetBkMode(1); // transparent
GfxSelectFont("Tahoma", Status("pxheight")/4 );
if(SelectedValue(allindi>0)){GfxSetTextColor(colorGreen);SetChartBkColor(colorPaleGreen);}
if(SelectedValue(allindi<0)){GfxSetTextColor(colorRed);SetChartBkColor(colorRose);}
if(SelectedValue(allindi==0)){GfxSetTextColor(colorLightGrey);SetChartBkColor(colorWhite);}
GfxTextOut(WriteIf(allindi>0,"UP",WriteIf(allindi<0,"DOWN","SIDEWAYS")),510,100);
}
//====================================

1 comments

1. sreedharkadam

supper

Leave Comment

Please login here to leave a comment.

Back