31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Buy = Cross(C,BBandTop(C,len,width));

Short = Cross(BBandBot(C,len,width),C);

Sell = Cross(MA(C,len),C);

Cover = Cross(C,MA(C,len));

//Chapter 2 Bollinger Band using

//RISK filtering

PositionSize = MarginDeposit = 1;

riskAmt = (BBandTop(C,60,2) - MA(C,60)) * pointValue;

COND1 = riskAmt <= 2000;

Buy = Cross(C,BBandTop(C,60,2)) AND COND1;

Short = Cross(BBandBot(C,60,2),C) AND COND1;

142

Sell = Cross(MA(C,60),C);

Cover = Cross(C,MA(C,60));

INTRODUCTION TO AMIBROKER’S AFL

//Chapter 2 MACD utilizing AMIBROKERS

//Exploration Feature

//Refer to the AMIBROKER Appendix for

//further explanation

Filter = 1;

PositionSize = MarginDeposit = 1;

myMACD = MACD(fast=12,slow =26);

myMACDAvg = MA(myMACD,9);

myMACDDiff = myMACD - MYMACDAvg;

leftBar2 = Ref(myMACDDiff,-4);

leftBar1 = Ref(myMACDDiff,-3);

centerBar = Ref(myMACDDiff,-2);

rightBar1 = Ref(myMACDDiff,-1);

rightBar2 = Ref(myMACDDiff,0);

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!