Quick Check for Ideal Potential Profit by Sosrodiningrat @2017 for Amibroker (AFL)
Sosrodiningrat over 9 years ago Amibroker (AFL)
Quick check for ideal potential profit when buy on open and sell on close on long position. Not for real trading, just for educational purpose. And could be a part of analyzing.
By Sosrodiningrat @2017
Screenshots
Indicator / Formula
Copy & Paste Friendly
//Quick Check Ideal Potential Profit when Long Position Buy on Open and Sell on Close by Sosrodiningrat @2017
OptimizerSetEngine("spso");OptimizerSetOption("Runs",1);OptimizerSetOption("MaxEval",1000);
SetTradeDelays(0,0,0,0);
SetOption( "AllowSameBarExit",True);
dummy=Optimize("dummy",1,1,1,1);
BuyPrice=O;
SellPrice=C;
Buy=C>O;
Sell=1;
//Plot(C,"",colorBlack,styleCandle);
Plot(Equity(1),"",colorGrey50,styleLine|styleOwnScale);
//====================================
GfxSetOverlayMode(1);
GfxSetBkMode(1); // transparent
GfxSelectFont("Tahoma", Status("pxheight")/16 );
GfxSetTextColor(colorGreen);
GfxTextOut("Equity= "+NumToStr(Equity(1)/ValueWhen(BarIndex()==1,Equity(1)),1.0)+" times",510,80);
//====================================0 comments
Leave Comment
Please login here to leave a comment.