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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Simple RSI with Profit Objective and Protective Stop

inputs: rsiLen(14),overBot(70),overSold(30);

If rsi(c,14) < overSold then buy this bar on close;

If rsi(c,14) > overBot 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;

326

TRADESTATION AND EASYLANGUAGE

Simple Stochastic with Profit Objective and Protective Stop

inputs: rawKlen(14),smooth1(3),smooth2(3);

vars: myFastK(0),myFastD(0),mySlowK(0),mySlowD(0);

Value1 = stochastic(h,l,c,rawKLen,smooth1,smooth2,1,myFastK,

myFastD,mySlowK,mySlowD);

If mySlowK cross above mySlowD and mySlowD < 20 then buy

this bar on close;

If mySlowK cross below mySlowD and mySlowD > 80 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;

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!