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

Naive System 01 by Sosrodiningrat @2017 for Amibroker (AFL)

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

Just for educational purpose and not for real trading.

Naive System 01
Buy on open, sell on close. Long position only.

By Sosrodiningrat @2017

Screenshots

Indicator / Formula

Copy & Paste Friendly
//Naive System 01 by Sosrodiningrat @2017

OptimizerSetEngine("spso");OptimizerSetOption("Runs",1);OptimizerSetOption("MaxEval",1000);

SetTradeDelays(0,0,0,0);
SetOption( "AllowSameBarExit",True);
b1=Optimize("b1",3,1,5,1);
s1=Optimize("s1",2,1,5,1);

BuyPrice=O;
SellPrice=C;

Buy1=Sell1=0;

group1=Day()==1 OR Day()==2 OR Day()==3 OR Day()==4 OR Day()==5 OR Day()==6 OR Day()==7;
group2=Day()==8 OR Day()==9 OR Day()==10 OR Day()==11 OR Day()==12 OR Day()==13 OR Day()==14;
group3=Day()==15 OR Day()==16 OR Day()==17 OR Day()==18 OR Day()==19 OR Day()==20 OR Day()==21;
group4=Day()==22 OR Day()==23 OR Day()==24 OR Day()==25 OR Day()==26 OR Day()==27 OR Day()==28;
group5=Day()==29 OR Day()==30 OR Day()==31;

if(b1==1){Buy1=group1;}
if(b1==2){Buy1=group2;}
if(b1==3){Buy1=group3;}
if(b1==4){Buy1=group4;}
if(b1==5){Buy1=group5;}
if(s1==1){Sell1=group1;}
if(s1==2){Sell1=group2;}
if(s1==3){Sell1=group3;}
if(s1==4){Sell1=group4;}
if(s1==5){Sell1=group5;}

Buy=Buy1;
Sell=Sell1;

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

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);
//====================================
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlue,0,L,-12);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,-12);
//====================================

1 comments

1. karanm

KINDLY UPDATE ON WHICH TIME FRAME TO TRADE AND HOW TO ENTER & EXIT THE TRADE.

Leave Comment

Please login here to leave a comment.

Back