APIBridge Advanced RSI + EMAUsing Pinescript, we will use charts of Cash/Future to trade in Options. Note this strategy works well with even the free version of TradingView.
The Relative Strength Index ( RSI ). Is a momentum oscillator that measures the speed and change of price movements. The RSI oscillates between zero and 100. Increasing RSI shows increasing bullish momentum. Decreasing RSI shows increasing bearish momentum. We take RSI upper bound as 80 to indicate bullish momentum and RSI lower bound as 20 to indicate bearish momentum.
Since this strategy uses underlying data (cash/future) to place trades in Options, please ignore the backtest of this strategy given by TradingView. TradingView does not provide options data but this strategy bypasses it.
Strategy Premise
The Relative Strength Index ( RSI ) is a momentum oscillator that measures the speed and change of price movements. The RSI oscillates between zero and 100. Increasing RSI shows increasing bullish momentum. Decreasing RSI shows increasing bearish momentum. We take RSI upper bound as 80 to indicate bullish momentum and RSI lower bound as 20 to indicate bearish momentum.
apibridge rsi + ema options / futures / commodity algo strategy logic
Long Entry: When RSI crosses over oversold level and fast ema crosses over slow ema , send LE .
Long Exit: When price hit Stop loss or Target .If SL/ TGT is not hit and reverse signal is sent by strategy then exit the Long
Short Entry : When RSI crosses under overbought level and fast ema crosses under slow ema , send SE
Short Exit : When price hit Stop loss or Target. If SL/ TGT is not hit and reverse signal is sent by strategy then exit Short
TradingView Parameters
1. Start Date(Mandatory) : The strategy does not take trade before this date
2. End Date(Mandatory) : The strategy does not take trade after this trade
3.RSI Length(Mandatory): Number of bars used to calculated RSI .
4.Fast Ema Length(Mandatory): Length for fast ema
5.Slow Ema Length(Mandatory): Length for slow ema
6.Source for rsi and ema calculation(Mandatory): Source to use for rsi and ema like close , open , high , low , hl2 etc
7.Overbought(Mandatory): To specify upper band of RSI .
8.Oversold(Mandatory): For specifying lower band of RSI .
9.plot ema or rsi (Mandatory) : Due to difference in scales of rsi and ema , strategy can only plot one of both precisely (the strategy logic which is based on both esi and ema is unaffected by this choice)
10.Quantity: We use this to specify the trade quantity (for Nifty min 75)
11.Custom Stop Loss in Points: Movement in chart price against the momentum which will trigger exit in options positions
12.Custom Target in Points: Movement in chart price against the momentum which will trigger exit in options positions
13.Base symbol: This is the base instrument symbol like NIFTY or BANK NIFTY .
14.Strike distance from ATM: Our default strike selection is considered as first ATM option (with nearest distance, only 100s are considered ). This strike
distance allows to calculate ATM options which are at fixed distance.
15.Expiry: Expiry of option. Weekly and monthly both expiry are allowed.
16.Instrument: For index instrument will be OPTIDX, for stock instrument will be OPTSTK
17.Strategy Tag: The Strategy of Nifty options configured in Api bridge.
Algoji
APIBridge support and resistance strategy for NSE OptionsStrategy Premise:
The strategy works on the Support and Resistance . The user specifies the trigger price and the strategy will open trades as soon as the market closes after crossing the trigger price. The stoploss and target is compulsory and the trades will close if either the target or stoploss is hit or Intraday end session is reached in case of MIS (Intraday settings) or expiry is reached .
If the positional settings (NRML) has been chosen then the trades will close when either stoploss or target hits or expiry is reached
==========Consecutive trades==========
The strategy takes a long entry on call long put short setting and a short position on put long and call short settings so call long and put short entries can be taken one after another without the need of closing the one of them. Similarly put long and call short can be taken one after another.
But put long and call short can not be taken one after another with both the trades open because on tradingview closes the previous long or short when we take short or long respectively. Similarly call long and put short can not be taken one after another with both the trades open
Create Alert
Simply copy the text written in Alert Message field on the top of input section and replace everything in the message box of the alert with this text
Strategy Parameters
1. Alert Message : Copy the string in the input field and replace with the text in the message box of the alert to get the automated trades
2. Use Backtesting : Check this box to use the backtesting parameters . The backtesting parameters will only show trades between the specified intervals
3. Starting Date and Time : The strategy will only place trades after this time according to logic
4. Ending Date and Time : The strategy willonly place trades before this time according to logic
5. Segment Type : Choose the segment type . MIS is Intraday and NRML is normal cash and carry/Positional
6. Start Session : This is the session in which the strategy will take entry according to logic every day . This parameter works only with MIS and not NRML
7. Ending Session : This is the session which will square off all the open trades . This parameter works only with MIS and not NRML
8. Long : Check this box for Long/Buy Positions
9. Long Price : This is the trigger price , the strategy will Long/Buy when the price closes after crossing this line.
10. Call or Put on Long : Choose whether you want to Long/Buy Call or Put
11. Stoploss and Target type for Long : Choose from the given types
12. Long Target : specify the target
13. Stoploss Value for Long : Specify the stoploss value
14. Use TSL : Check this to use trailing stoploss
15. ATR settings : Set the atr settings to use atr based stoploss
16. Short : Check this to Short/Sell
17. Short Price : This is the trigger price , the strategy will Long/Buy when the price closes after crossing this line.
18. Call or Put on Short: Choose whether you want to Long/Buy Call or Put
19. Stoploss and Target type for Short: Choose from the given types
20. Short Target : specify the target
21. Stoploss Value for Short: Specify the stoploss value
22. Use TSL : Check this to use trailing stoploss
23. ATR settings : Set the atr settings to use atr based stoploss
24. Instrument Type : Choose the option type
25. Expiry Settings : Configure the expiry date . the strategy will not take entry after expiry
26. Symbol : Specify Symbol name if want to trade in symbol other than current chart symbol
27. Strike Type/Money Type : select the money type
28. Strike Difference : Enter the difference between the two consecutive strikes of the choosen asset
29. Strike Distance from ATM : Enter the distance of strike from ATM which you want to buy in any strike type/money type . If zero has been choosen in case of OTM/ ITM then the strike dif will used as default
30. Quantity : Specify the number of lots you want to trade
31. Strategy Tag : Specify the strategy tag you wan to use with APIBRIDGE . If left blank it will trade in the strategy tag fed in the APIBRIDGE
APIBridge Candlestick Reversal SystemStrategy Premise
This strategy uses the Wick Reversal System introduced in Pivot Boss and generates signals based on Candlestick Patterns.
– Wick Reversal System
– Extreme Reversal System
– Outside Reversal System
– Doji Reversal System
Wick Reversal System:
1. For a Bullish reversal wick to exist, the close of the bar should fall within the top 35% of the overall range of the candle.
2. For a bearish reversal wick to exist, the close of the bar should fall within the bottom 35% of the overall range of the candle.
Extreme Reversal System:
1. The first bar of the pattern is about two times larger than the average size of the candles in the look-back period.
2. The body of the first bar of the pattern should encompass more than 50% of the bar’s total range, but usually not more than 85%.
3. The second bar of the pattern opposes the first. If the first bar of the pattern is bullish (C > 0), then the second bar must be bearish (C < 0). If the first bar is bearish (C < 0), then the second bar must be bullish (C > 0).
Outside Reversal System:
1. The Engulfing bar of a bullish outside reversal setup has a low that is below the prior bar’s low (L < L) and a close that is above the prior bar’s high (C > H).
2. The Engulfing bar of a bearish outside reversal setup has a high that is above the prior bar’s high (H > H) and a close that is below the prior bar’s low (C < L).
3. The Engulfing bar is usually 5 to 25 percent larger than the size of the average bar in the look-back period.
Doji Reversal System:
1. The open and close prices of the Doji should fall within 10 percent of each other, as measured by the total range of the Candlestick .
2. For a Bullish Doji , the high of the Doji Candlestick should be below the ten-period Simple Moving Average (H SMA (10)).
4. For a Bearish Doji , one of the two bars following the Doji must close beneath the low of the Doji (C < L or C < L).
5. For a Bullish Doji setup, one of the two bars following the Doji must close above the high of the Doji (C > H) or C > H)
Strategy Logic
Long Entry:
When Low Pivot Point and Wick Reversal System and Bullish Wick Reversal Setup Pattern Send, LE
OR When Low Pivot Point and Extreme Reversal System and Bullish Extreme Reversal setup Send ,LE
OR When Low Pivot Point and Outside Reversal System and Bullish Outside Reversal Setup Send LE
OR When Low Pivot Point and Doji Reversal System and Bullish Doji Reversal Setup Send, LE
Long Exit:
Either when SL or Target is hit. If SL/ TGT is not hit and
When High Pivot Point and Wick Reversal System and Bearish Wick Reversal Setup Pattern Send LXSE
OR When High Pivot Point Extreme Reversal System and Bearish Extreme Reversal setup Send LXSE
OR When High Pivot Point Outside Reversal System and Bearish Outside Reversal Setup Send LXSE
OR When High Pivot Point Doji Reversal System and Bearish Doji Reversal Setup Send, LXSE
Short Entry:
When High Pivot Point and Wick Reversal System and Bearish Wick Reversal Setup Pattern Send SE
OR When High Pivot Point Extreme Reversal System and Bearish Extreme Reversal setup Send SE
OR When High Pivot Point Outside Reversal System and Bearish Outside Reversal Setup Send SE
OR When High Pivot Point Doji Reversal System and Bearish Doji Reversal Setup Send, SE
Short Exit:
Either when SL or Target is hit. If SL/ TGT is not hit and
When Low Pivot Point and Wick Reversal System and Bullish Wick Reversal Setup Pattern Send, SXLE
OR When Low Pivot Point and Extreme Reversal System and Bullish Extreme Reversal setup Send ,SXLE
OR When Low Pivot Point and Outside Reversal System and Bullish Outside Reversal Setup Send SXLE
OR When Low Pivot Point and Doji Reversal System and Bullish Doji Reversal Setup Send, SXLE
Candlestick Reversal System Algo Strategy Parameters for TradingView Charts
1.Length: This is number of bars used to calculated Ex: 14 à previous 14 candles are used
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
4.Trade Setup : Intraday / Positional (Selecct accordingly)
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
BE- InsideOut Explosion - Trade the Benefit Of DoubtDear Traders,
Here with presenting the new Indicator which is primarily built based on the the concept Contraction & Explosion.
Idea behind this Indicator: I am sure every trader would have heard about consolidation and Expansion. When we we look deep inside the consolidation zone it leaves a mark
on the direction most of the time and just explode breaking the consolidation zone. What if the explosion is to trap the retailers like me!!. That's why I call this as Benefit of doubt. If the direction of is right I just sail with the trade right inside the consolidation zone. If I am on the wrong side ! No worries My Money management rules and Protection Legs kicks in and saves my capital.
This Indicator Analyses the Volume, and Chart Patterns inside the Zones and if the price breaks the patterns, initiate the trades. You can trade with Dhan HQ or Algoji.
What this indicator is providing:
Based on the chart patterns and using the inputs provided for RISK and Money Management options, Indicator continuously scans for trading opportunities and provides alerts for possible trades. I have tried to capture some analytical inputs for one to think and take control over the Reward, Risk and Money management parameters to tweak the indicator accordingly.
Note: Indicated PNL is calculated on the Futures Chart with 2 Lots taken per trade.
If you are a Options Traders:
1. Auto Strike is inbuilt and can be traded only if you are trading via AlgoJi.
You will constantly be informed about trade summary, PNL and SL updates as per your preferred choice.
Enjoy!
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
Happy to receive suggestions and feedback in order to improve the performance of the indicator better.
APIBridge Nifty Options Algo StrategyUsing Pinescript, we will use charts of Cash/Future to trade in Options. Note this strategy works well with even the free version of TradingView.
The Relative Strength Index ( RSI ). Is a momentum oscillator that measures the speed and change of price movements. The RSI oscillates between zero and 100. Increasing RSI shows increasing bullish momentum. Decreasing RSI shows increasing bearish momentum. We take RSI upper bound as 80 to indicate bullish momentum and RSI lower bound as 20 to indicate bearish momentum.
We use the above premise to create options buy-only strategy which trades in ATM strikes by default. This strategy requires very less margin (Minimum Rs . 15000).
Since this strategy uses underlying data (cash/future) to place trades in Options, please ignore the backtest of this strategy given by TradingView. TradingView does not provide options data but this strategy bypasses it.
Strategy Premise
The Relative Strength Index (RSI) is a momentum oscillator that measures the speed and change of price movements. The RSI oscillates between zero and 100. Increasing RSI shows increasing bullish momentum. Decreasing RSI shows increasing bearish momentum. We take RSI upper bound as 80 to indicate bullish momentum and RSI lower bound as 20 to indicate bearish momentum.
We use the above premise to create options buy-only strategy which trades in ATM strikes by default. This strategy requires very less margin (Rs. 15000 should be sufficient).
NSE Options Algo Strategy Logic
Long Entry: When RSI goes above 80, send LE in an auto-calculated option strike Call. When RSI goes below 20, send LE in auto-calculated option strike Put.
Long Exit: When we hit Stop loss or Target. In case SL/TGT does not hit and reverse RSI goes above 80 send Long Exit in auto-calculated option. Put as per last trade; RSI goes below 20, send LX in auto-calculated option call as per last trade.
For Long and Short entry the order is fired in the option buying side with auto strike price selection.
Option Strategy Parameters for TraingView Charts
RSI Length(Mandatory): Number of bars used to calculated RSI.
Upper Band(Mandatory): To specify upper band of RSI.
Lower Band(Mandatory): For specifying lower band of RSI.
Use reversal from Upper Band (Optional): This will enable short entry when RSI is falling below 80 from upper band. Recommended to keep unchecked initially.
Use reversal from Lower Band (Optional): This will enable long entry when RSI is raising above 20 from lower band. Recommended to keep unchecked initially.
Quantity: We use this specify the trade quantity (for Nifty min 75)
Custom Stop Loss in Points: Movement in chart price against the momentum which will trigger exit in options positions
Custom Target in Points: Movement in chart price against the momentum which will trigger exit in options positions
Base symbol: This is the base instrument symbol like NIFTY or BANK NIFTY.
Strike distance from ATM: Our default strike selection is considered as first ATM option (with nearest distance, only 100s are considered ). This strike distance allows to calculate ATM options which are at fixed distance.
Expiry: Expiry of option. Weekly and monthly both expiry are allowed.
Instrument: For index instrument will be OPTIDX, for stock instrument will be OPTSTK
Strategy Tag: The Strategy of Nifty options configured in Api bridge.
Setting Up Alert
Before setting up the alert make sure that you have selected desired script, time frame, strategy settings, and APIbridge configuration. Click in settings add alert and paste {{strategy.order.comment}} in message box.
Important: Do not change any settings during live trading. It may break the sequence of exit for the correct call/put.
BE - Volume Scalping ProDear Traders,
Here with presenting the new Indicator (Strategy) for scalping which is primarily built based on the the Volume Analysis.
Idea behind this Indicator: I am sure every trader would agree that Volume is one of the Leading indicator along with Price, and hence thought to use the same for scalping the trades. There is a direct co-relation between the price and volume and thereby used this as a base for arriving at strength of the volume pumped in. Indicator is working on the Logic of "What is the ROC in price for the volume dumped in and does ROC quantify the same which is happened in the recent past of x candles." In order to be successful in scalping trade, Accuracy, Risk to reward and Money Management is very much crucial and hence thought so much on this to make it happen.
Note: Accuracy here being profitable in the trade and not hitting the bulls eye all the time.
What this indicator is providing:
Based on the volume, ROC & Candle Thresholds and using the inputs provided for RISK and Money Management options, Indicator continuously scans for trading opportunities and provides alerts for possible trades.
Alerts & Notifications:
There are basically 3 types of Alerts provided one with General Notification and Other with Dhan HQ notifications to support Algo Trades and AlgoJi for supporting Algo trades too.
Self Declaration:
I have been testing the performance in 30 seconds and 1 min chart and I haven't faced any issues yet. I strongly recommend users to use the same in timeframe less than 10 Min only.
Enjoy!
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
Happy to receive suggestions and feedback in order to improve the performance of the indicator better.
Tripple EMA Strategy - Dhan HQDear Traders,
Here with presenting the new Indicator (Strategy) which is primarily built based on the the EMA moving Average and Candlestick Pattern.
Idea behind this Indicator: I am sure every trader would have traded using Moving average one day or the other. And Moving average is theoretically they are Lagging and the EMA are used in place of Moving average just to avoid a bit of Lag to take advantage of those accuracy while avoiding the Lag. In order to be successful in trading Money Management and Risk Management is very much crucial and should be part of every trade we place.
What this indicator is providing:
Based on the EMA and candlestick patterns and using the inputs provided for RISK and Money Management options, Indicator continuously scans for trading opportunities and provides alerts for possible trades. I have tried to capture some analytical inputs for one to think and take control over the Reward, Risk and Money management parameters to tweak the indicator accordingly.
Below are the Analytical outputs provided:
1. Total Trades taken (History till present) and its profitability % & appx PNL
2. Current Dates & Yesterday's Trades along with its appx PNL
3. Long Trades performance vs Short Trades performance
4. Retrieve PNL values post specified Date in the Input settings.
5. Last 7 Days PNL
6. Month's PNL
Note: There is known BUG in the calculation where the first date of the month for Monthly PNL value is a trading Holiday then Monthly PNL is being displayed as 0. similarly this Bug is flowed for Last 7 Days PNL. This will be addressed in upcoming version along with planned release.
Alerts & Notifications:
There are basically 2 types of Alerts provided one with General Notification and Other with Dhan HQ notifications to support Algo Trades for Dhan HQ Baskets.
Overview for Dhan HQ Trade Alerts:
1. When the Day Beginning (At Session Start) Hedge Position can be placed and shall be squared off post Closing the session
2. During the course of the Day Buy & Sell Baskets shall be executed
3. Can map the Trade Level SL values
4. Can map Daily Limit for SL to avoid excessive Loss. Upon Loss you could stop trades for the complete day or you may restart the trade post completion of X no of hours.
Enjoy!
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
Happy to receive suggestions and feedback in order to improve the performance of the indicator better.