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 a 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) “,
Steps First, select the strategy from the indicator named "APIBridge Candles" and apply in the chart.
Configuring input – First, 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 combinations of candlestick patterns Add Alert on candles 2nd alert is created with bullish engulfing for entry and bearish engulfing for exit
Candles Input And a 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 further 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. For a detailed article with a screenshot please visit here kb.mycoder.pro/apibridge/how-to-...
Setting Up Alert
Before setting up the alert make sure that You have selected desired script, timeframe, and strategy settings, APIBridge ™ is configured and running. Click in settings add alert and paste {{strategy.order.comment}} in the message box.
Important: do not change any settings during live trading.
Strategy Parameters on Trdaingview 1.Indiactor Setup: Choose the Candle Patterns you want to use
2.Backtesting : Use this to backtest the strategy between Starting and Ending Date and time , it can also be used to set trades in future time
3.Alert_Message : Need to copy while creating alert into Message Box
5.Start Time Stop Time (Session 1) : Intraday / Positional start time and end time of trade for session 1
6.End Session 1 : Define time to exit any existing position taken in session 1 so that exchange charges will not apply
7.Use Second Session : Check this to use second intraday session
8.Start Time Stop Time (Session 2) : Intraday / Positional start time and end time of trade for session 2
9.End Session 1 : Define time to exit any existing position taken in session 2 so that exchange charges will not apply
10.Use Target : check if you want to set required target if not cheque will not applicable
11.Use StopLoss : Cheque if you want to set stop loss if not cheque will not applicable
12.Trailling Stoploss : Cheque if you want to set trailing stop loss if not cheque will not applicable
13.Point Or Percentage For TG SL : Use Points or Percentage as per your choice
14.Target : Set as per the selection of (Point Or Percentage For TG SL)
15.Stop Loss : Set as per the selection of (Point Or Percentage For TG SL)
16.TSL_Type : Select as per your logic in %/ATR/Points
17.TSL_Input : Set in case you select %/Points in TSL_Type
18.ATR Length : Set as per your logic if you select ATR in the field of TSL_Type
19.ATR_Mult : Set as per your logic if you select ATR in the field of TSL_Type
20.Segment : Select segment of your logic EQ/FUTIDX/FUTSTK/OPTIDX/OPTSTK/FUTCUR/FUTCUM (Used in case of option / Futures )
21.Select Expiry Date : Select the expiry date of your trade as per the segment you selected (Used in case of option / Futures )
22.Select Expiry Month : Select the expiry Month of your trade as per the segment you selected (Used in case of option / Futures )
23.Year : Select the expiry Year of your trade as per the segment you selected (Used in case of option / Futures )
24.Quantity : Enter the quantity in which you want to trade (Used in case of option / Futures )
25.Product Type : Select MIS/Normal/ CNC as per your logic (Used in case of option / Futures )
26.Order Type : Select Market/Limit as per your logic (Used in case of option / Futures )
27.Strategy Tag : Enter the value in case you are using webhook / advance template in APIBridgeTM
28.Lotsize : Enter the lotsize as per your lotic and quentity selection (Used in case of option / Futures )
29.STEP (OTM/ATM/ ITM ) : Select OTM(+1)/ATM(0)/ ITM (-1) as per your logic works in case of options only
30.DIFFERENCE_BETWEEN 2 STRIKE : Select difference of 2 strikes you have used in APIBridge symbol setting list, like for Nifty 50 BankNifty 100
31.APIB Port : Set as per provided to you by Algoji in case of webhook / advance templet
The Segment full form is given below EQ Equity FUTIDX Future Index FUTSTK Future Stock OPTIDX Index Option OPTSTK Stock Option FUTCUR Futcur Currency FUTCUM Future Commodity
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.