Tag: How to set-up algo trading using amibroker afl

MarketSecrets - Learn To Trade Like a Pro

How to setup Algo-Trading for Open Range Breakout (ORB) Trading Strategy?

How to setup Algo-Trading for Open Range Breakout (ORB) Trading Strategy?

Condition: Open Range breakout. This is exactly opposite to OHOL strategy. If open price of the stock is equal to today’s low and in case if price breaks and goes below today’s low, we can short the stock. Likewise If open price of the stock is equal to today’s high and in case if price breaks out and goes above today’s high, we can go long.

Script Setup:

I’ll go long if
• Stock is an OH candidate and if
• price breaks out to upside from the OH level and
• Current time is between 9.45 & 3.15

I’ll short if
• Stock is an OL candidate and if
• price breaks out to downside from the OL level and
• Current time is between 9.45 & 3.15

This was one of the strategies commonly used for the reversal trades, especially if you are actively trading on OHOL strategy.

In the previous episodes, we have discussed on how to install amibroker, where to get 1 minute data, how to import the data into amibroker and how to set-up the database and charts. We also discussed on some of the commonly used sripts. So please do refer the previous episodes in case you are not able to replicate this.

How to setup Algo-Trading for Simple Breakout Trading Strategy?

How to setup Algo-Trading for Simple Breakout Trading Strategy?

Condition: It is very simple. If price breaks out above the previous day’s high, go long. If price breaks out below the previous day’s low, short. There is one additional check – price should have opened between previous day’s low and high

Script Setup:

I’ll go long if
• Today’s opening price is less than previous day’s high
• Today’s high is greater than previous day’s high (this is break out to upside)
• Current time is between 9.45 & 3.15

I’ll short if
• Today’s opening price is higher than previous day’s low
• Today’s low is lower than previous day’s low (this is break out to downside)
• Current time is between 9.45 & 3.15

This simple set-up can be used to create AFLs for any of the breakout patterns in including Flag, Triangles, etc. We will use this code as base template in future episodes to teach various breakout patterns.

error: Content is protected !!