Select Page

If you study candlestick patterns, we have something exciting for you. Moreover, in this tutorial, we are going to set up an automated trading system based on any combination of 15 candlestick patterns.

STRATEGY FEATURES:

  • Firstly you can choose single or any combination of multiple candlestick patterns to trade from the available 15 patterns.
  • You can configure all alerts for auto trading via APIBridge; you can adjust trade quantity also.
  • Intraday setup with Entry and Exit time.
  • Optional Target and Stoploss.

To set up this blog, we will pick a strategy from a public library named “Candlestick Patterns Identified (updated 3/11/15) “,

Indicators and strategies - candlestick patterns

Steps

  1. First Download the code from here.
  2. After that go to the trading view chart, paste the downloaded code in blank pine editor space, save the code and add it to the chart.
TradingView pine editor

3. Configuring input – Firstly click on settings to have input options. After that in inputs, you can find 15 different candlestick patterns, intraday settings, target, and stop-loss parameters.

Configuring input- TradingView
Candles TradingView

Illustration of using parameters

There are 15 candlestick patterns you can use to trade. Beginners can find the type of action taking place by candle at the end of the candlestick name.  Ex: USE HANGING MAN FOR BEARISH means that if the Hanging pattern occurs “BEARISH” (short trade) will be happening.

There are two ways in which you can use this template:

You can create different alerts for different combinations of candlestick patterns,

EXAMPLE: Create 1st alert with Bullish Harami for entry and bearish harami for exit

different alerts for different combination of candlestick patterns
Add Alert on candles

2nd alert is created with bullish engulfing for entry and bearish engulfing for exit

Candles Input

2 nd method to use this strategy

You can use multiple patterns at the same strategy and one alert for multiple patterns,

Candlestick patterns

In this instance, long trade will take place whenever Bullish Harmi or Bullish Engulfing occurs.

A short trade will take place whenever Bearish engulfing or Bearish Harami occurs.

  • If a long position is taken by Bullish Harmi and is open and furtherly Bullish Engulfing is formed or Bullish Harami occurs again no new trade will be added and existing long will be carried.
  • If a long position is taken by bullish harm and is open and Bearish harami or Bearish engulfing occurs the position will be reversed.

OTHER PARAMETERS

  • DOJI pattern indicates trend reversal, there is an option to exit positions if the Doji pattern occurs.
  • Target and stop-loss can be specified as optional parameters.
  • Other parameters to specify intraday trade and square off timings.

After creating the alert all you need to do is add the script in abridge software(with no quantities specified in API bridge) and enjoy the automated trading.

Do you want coding help to deploy your own strategy for live trading? Check our coding assistance.