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.

If marketPosition =-1 then

begin

If c < entryPrice - 3* avgTrueRange(10) then

buyToCover this bar on close;

if c > entryPrice + 1* avgTrueRange(10) then

buyToCover this bar on close;

end;

Simple CCI with Profit Objective and Protective Stop

inputs: cciLen(20),smooth(9);

vars: myCCIVal(0);

myCCIVal = average(cci(cciLen),smooth);

If myCCIVal crosses above -100 then buy this bar on close;

If myCCIVal crosses below 100 then sellShort this bar on

close;

If marketPosition = 1 then

begin

If c > entryPrice + 3* avgTrueRange(10) then sell

this bar on close;

if c < entryPrice - 1* avgTrueRange(10) then sell

this bar on close;

end;

If marketPosition =-1 then

begin

If c < entryPrice - 3* avgTrueRange(10) then

buyToCover this bar on close;

if c > entryPrice + 1* avgTrueRange(10) then

buyToCover this bar on close;

end;

327

TRADESTATION AND EASYLANGUAGE

Connors / Alvarez with Time-Based Exit

inputs: mavlen(200),rsiLen(2),rsiBuyVal(20),rsiSellVal(80),

holdPeriod(5);

Condition1 = c > average(c,mavLen);

Condition2 = rsi(c,rsiLen) < rsiBuyVal;

Condition3 = rsi(c,rsiLen) > rsiSellVal;

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!