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.

range day and initially puts on two contracts and then pulls one off after a certain

profit level and then lets the second contract run its course. It is out on the close

no matter what. This algorithm incorporates trade management in the form of

protective stop, breakeven stop, and trailing stop (Box 3.6).

Box 3.6 Day trading the mini Russell

CanTrade = False

CanBuy = False

CanShort = False

If yesterday’s True Range < MAV(TR,10), then CanTrade = True

If yesterday’s close >= prior day’s close, then CanBuy = True

If yesterday’s close < prior day’s close, then CanShort = True

If CanTrade, then

If CanBuy, then buy 2 units tomorrow at open +0.2 *MAV(TR,10) stop

If CanShort, then sell short 2 units tomorrow at open −0.2*MAV(TR,10)

stop

If market position = long

If current size = 2 units, then

If H of 5 minute bar > entryPrice + 4.00, then

exitLong 1 unit at H of day – 4.00 on a stop

If current size = 1 unit, then

exitLong at entryPrice stop or MOC

If market position = short

If current size = 2 units, then

If L of 5 minute bar <= entryPrice – 4.00, then

exitShort 1 unit at L of day + 4.00 on a stop

If current size = 1 unit, then

exitLong at entryPrice stop or MOC

111

COMPLETE TRADING ALGORITHMS

How about a system that lets the Commitment of Traders Report (COT) guide its

directional trades—one that only trades in the direction of the commercial interests?

If the net commercial position is positive, then only take long positions, and vice

versa. This type of trading system uses the COT as a sentiment indicator. Several

trading platforms allow you to import the COT data. This system will be included

on this books companion website and www.georgepruitt.com.

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!