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.

Value1 = swingHighBar(1,h,pivotHiStrength,pivotHiLookBack);

Value2 = swingLowBar(1,l,pivotLowStrength,pivotLowLookBack);

If c > average(c,movAvgLen) then

Begin

If Value2 > -1 and marketPosition <> 1 then buy this

bar on close;

end;

334

TRADESTATION AND EASYLANGUAGE

If c < average(c,movAvgLen) then

Begin

If Value1 > -1 and marketPosition <> -1 then sellshort

this bar on close;

end;

If Marketposition = 1 then

Begin

sell("L-profitObj") next bar at entryPrice

+ LprofitObj/Bigpointvalue limit;

sell("L-protStop") next bar at entryPrice

- LstopLoss/Bigpointvalue stop;

If Barssinceentry >= longExitDays then sell this bar

on close;

end;

If Marketposition = -1 then

Begin

Buytocover("S-profitObj") next bar at entryPrice

- SprofitObj/Bigpointvalue limit;

BuyToCover("S-protStop") next bar at entryPrice

+ SstopLoss/Bigpointvalue stop;

If Barssinceentry >= shortExitDays 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!