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.

Turtle Trading

Algorithm Flowchart

Start

Calculate N

and Unit Size

Calculate

System 1

Entry and Exit

Levels

Calculate

System 2

Entry and Exit

Levels

Calculate 2%

Risk Levels

System 1 System 1

Liquidation

Stop =

Max (Sys1 Exit,

2% Stop)

Which System

Initiated Long

Pos?

Liquidation

Stop =

Max (Sys2 Exit,

2% Stop)

Long

Is Current

Position Long,

Short, or Flat?

Which System

Initiated Long

Pos?

System 2 System 2

Flat

Short

Liquidation

Stop =

Min (Sys2 Exit,

2% Stop)

Liquidation

Stop =

Min (Sys1 Exit,

2% Stop)

No

Begin

Simulation

Trading

No

Was Last

Trade a

Loser?

Yes

Is System 1 Long

Entry < System 2

Long Entry?

No

Buy Stop =

System 2

Entry

78

COMPLETE TRADING ALGORITHMS

Place

Simulated

System 1

Buy/Short

Entry/Exit

Orders

Track

Simulated

Positions

Last Trade

Loser = Yes

End

Simulation

Winning Trade

Observed

Losing Trade Observed

Place Order

to Liquidate

Long

No

No

Yes

Sell Stop =

System 1

Entry

Was Last

Trade a

Loser?

Yes

Sell Stop =

System 1

Entry

No

Is Short Entry

Closer Than Long

Liquidation?

Yes

Long

Is System 1 Short

Entry > System 2

Short Entry?

Is Current

Position Long,

Short, or Flat?

No

Short

Sell Stop =

System 2

Entry

Is Long Entry

Closer Than Short

Liquidation?

No

Place Order to

Liquidate

Short

Yes

Place Order to

Reverse from

Long to Short

Flat

Place Buy and

Sell Short

Orders to

Initiate New

Positions

Yes

Place Order to

Reverse from

Short to Long

FIGURE 3.1

Turtle trading algorithm flowchart.

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!