Index investingThe Index Investing indicator simplifies decision-making for adding to Index ETF's Long-term investments. By utilizing a percentage discount methodology, it highlights potential opportunities to enhance portfolios. This straightforward tool aids in identifying favorable moments to invest based on calculated price discounts from selected reference points, making the process more systematic and less subjective.
🔶 SETTINGS
Reference Price: Choose between 'All-Time-High' or 'Start of the Year' as the basis for calculating discount levels. This allows for flexibility in strategy depending on market conditions or investment philosophy.
Discount 1 %, Discount 2 %, Discount 3 %: These inputs define the percentage below the reference price at which buy signals are generated. They represent strategic entry points at discounted prices.
🔶 Default Parameters
The default parameters of 4.13%, 8.26%, and 12.39% for the discount levels are chosen based on the average 5-year return of the NSE:NIFTY Index, which stands at approximately 12.39%. By dividing this return into three parts, we obtain a structured approach to capturing potential upside at varying levels of market retracement, providing a logical basis for the selected default values.
Users have the flexibility to modify these parameters, tailoring the indicator to fit their unique approach and market outlook.
🔶 How Levels Are Calculated
Discount levels are calculated using the formula: Discount Price = Reference Price * (1 - Discount %) . This succinct approach establishes specific entry points below the chosen reference, such as an all-time high or the year's start price.
🔶 How Are the Buy Labels Generated
Buy signals are generated when the market price(Low of the candle) crosses under any of the defined discount levels. Each level has a corresponding buy label ('Buy 1', 'Buy 2', 'Buy 3'), which is activated upon the price crossing below the specified discount level and is only reset at the beginning of a new year or upon reaching a new reference high, ensuring signals are not repetitive for the same price level.
🔶 Other Features
Alerts: The indicator provides alerts for each buy signal, notifying potential entry points at their defined discount levels. The alert triggers only once per candle.
Year Marker: A vertical line with an accompanying label marks the start of each trading year on the chart. This feature aids in visualizing the temporal context of buy signals and reference price adjustments.
Nifty50
Nifty 50 5mint Strategy
The script defines a specific trading session based on user inputs. This session is specified by a time range (e.g., "1000-1510") and selected days of the week (e.g., Monday to Friday). This session definition is crucial for trading only during specific times.
Lookback and Breakout Conditions:
The script uses a lookback period and the highest high and lowest low values to determine potential breakout points. The lookback period is user-defined (default is 10 periods).
The script also uses Bollinger Bands (BB) to identify potential breakout conditions. Users can enable or disable BB crossover conditions. BB consists of an upper and lower band, with the basis.
Additionally, the script uses Dema (Double Exponential Moving Average) and VWAP (Volume Weighted Average Price) . Users can enable or disable this condition.
Buy and Sell Conditions:
Buy conditions are met when the close price exceeds the highest high within the specified lookback period, Bollinger Bands conditions are satisfied, Dema-VWAP conditions are met, and the script is within the defined trading session.
Sell conditions are met when the close price falls below the lowest low within the lookback period, Bollinger Bands conditions are satisfied, Dema-VWAP conditions are met, and the script is within the defined trading session.
When either condition is met, it triggers a "long" or "short" position entry.
Trailing Stop Loss (TSL):
Users can choose between fixed points ( SL by points ) or trailing stop (Profit Trail).
For fixed points, users specify the number of points for the stop loss. A fixed stop loss is set at a certain distance from the entry price if a position is opened.
For Profit Trail, users can enable or disable this feature. If enabled, the script uses a "trail factor" (lookback period) to determine when to adjust the stop loss.
If the price moves in the direction of the trade and reaches a certain level (determined by the trail factor), the stop loss is adjusted, trailing behind the price to lock in profits.
If the close price falls below a certain level (lowest low within the trail factor(lookback)), and a position is open, the "long" position is closed (strategy.close("long")).
If the close price exceeds a certain level (highest high within the specified trail factor(lookback)), and a position is open, the "short" position is closed (strategy.close("short")).
Positions are also closed if they are open outside of the defined trading session.
Background Color:
The script changes the background color of the chart to indicate buy (green) and sell (red) signals, making it visually clear when the strategy conditions are met.
In summary, this script implements a breakout trading strategy with various customizable conditions, including Bollinger Bands, Dema-VWAP crossovers, and session-specific rules. It also includes options for setting stop losses and trailing stop losses to manage risk and lock in profits. The "trail factor" helps adjust trailing stops dynamically based on recent price movements. Positions are closed under certain conditions to manage risk and ensure compliance with the defined trading session.
CE=Buy, CE_SL=stoploss_buy, tCsl=Trailing Stop_buy.
PE=sell, PE_SL= stoploss_sell, tpsl=Trailing Stop_sell.
Remember that trading involves inherent risks, and past performance is not indicative of future results. Exercise caution, manage risk diligently, and consider the advice of financial experts when using this script or any trading strategy.
NIFTY 50 5mint StrategyThis is an intraday strategy for NIFTY50 Based First candle High and Low breakout.
The strategy takes user inputs for the start and end dates, start and end months, and start and end years, which define the time range to trade. The user can also specify the maximum number of trades to take during the time range and the length of the Exponential Moving Average ( EMA ) used in the strategy
In this strategy, the First candle's high and low are calculated and used as entry and exit points for trades. If the close price breaks above the First candle's high, a buy signal is generated. Conversely, if the close price breaks below the First candle's low, a sell signal is generated.
The strategy uses the Exponential Moving Average ( EMA ) as a filter to close entered positions either long or short, EMA also acts Target. If the close price falls below the EMA, a long position is closed, and if the close price rises above the EMA, a short position is closed or the PreviousCandleClose is above the First candle's high a short position is closed, When the PreviousCandleClose is below the First candle's low a long position is closed, First candle's high act as Stoploss
The strategy limits the number of trades taken within the specified time range, and if the time range is exceeded, all positions are closed.
Finally, the strategy plots the First candle's high and low, EMAs on the chart for visual reference.
Default settings work best with the 5mint candle, you may tweak settings according to your needs.
backtesting helps in interpreting how the trading strategy would have behaved in the past, and forward testing (paper trading) informs the traders how it would perform now.
SGX Nifty OHLC for Nifty 50 IndexSGX Nifty OHLC for Nifty 50 Index
What is this Indicator?
• This indicator calculates the OHLC levels of SGX Nifty.
How does SGX Nifty impact NIFTY and the Indian Market?
• Helps in predicting NIFTY50 Index behavior.
• The closing price of today's 9.14 am (IST) SGX Nifty will be the Open of today's Nifty50 Open. This helps to determine the opening Gap of Nifty50.
• SGX Nifty OHLC levels can act as support and resistance in Nifty50.
Who to use?
• Beneficial for Day Traders, who trade in NIFTY Index.
What timeframe to use?
• Use 1 minute for better accuracy.
• Other timeframes will also work.
Important Note
• Use 1 min timeframe for accurate OHLC.
• In other timeframes OHLC will have negligible difference, it won't be huge.
• This indicator will appear only on NIFTY Index and Futures chart.
• To hide the warning label go to the indicator Menu.
VWAP For NIFTY & BANKNIFTY [Zero54]NIFTY and BANKNIFTY Being Index do not have VWAP (because there is no volume generated). This is a simple script that displays NIFTY's future VWAP on NIFTY's Spot chart and similarly, displays BANKNIFTY's future VWAP on BANKNIFTY's sport chart. Fast and quick. Just few lines of code. No hefty un-necessary calculations.
No settings necessary. The script automatically detects NIFTY and BANKNIFTY and displays the corresponding VWAP.
Enjoy and share the knowledge. If you love this script, please boost/love this script and add a comment. Cheers!
NSE:NIFTY
NSE:BANKNIFTY
Gann Levels For Nifty Gann Levels for nifty 50 is very important to trade in options. so i create 50 gann levels for intraday trading.
Nifty Gap ⇅This indicator help to find NIFTY gap up or gap down opening,
use this indicator on SGX NIFTY
Chirag Strategy SMA with StopLossThe Moving Average Crossover trading strategy is possibly the most popular trading strategy in the world of trading. This strategy is a good example of so-called traditional strategies. Traditional strategies are always long or short. That means they are never out of the market. The concept of having a strategy that is always long or short may be scary, particularly in today’s market where you don’t know what is going to happen as far as risk on any one market. But a lot of traders believe that the concept is still valid, especially for those of traders who do their own research or their own discretionary trading.
This version uses crossover of simple moving averages of length 10 and 13. This strategy is best suitable for NIFTY and BANKNIFTY under 15min candlestick for intraday and 1hour candlestick for long-term.
Top 40 constituents of Nifty50Displays real-time candles of top 40 constituents of Nifty50 for a given time frame, side-by-side. This gives an overall idea of breadth and depth of market movements in the time-frame.
Please note that, this is not a standard chart rendered bar-wise and may take time to load as it requests multiple securities. You could modify the contents, from settings, to include stocks from your portfolio or indices of different sectors.
NSE:NIFTY
BankNifty - OBVThis script tries to draw OBV for BankNifty using Futures Volume along with Average OBV. For Nifty50 just change the Futures Volume symbol in settings. Look at devations in Price vs OBV or Average OBV breakout.
NSE:NIFTY
NSE:BANKNIFTY
Nifty_Price_Movement_BuildUPDashboard to see Price Momentum Build-Up at Nifty.
It cumulates all prices and their respective weightage.
During initial of a candle, we are not aware of volume is High or Not, we only get it in later buildup. But Price buildup will display it at the same instant that what is going with the price of all stocks.
The logic used here is that
1) If a stock close > open at a particular instant it will add that stock multiplied with its weightage in Nifty to the list of stocks that are positive.
2) If a stock close < open at a particular instant it will add that stock multiplied with its weightage in Nifty to the list of stocks that are negative.
3) Above two will give you data that how many of them are positive and are negative at a particular instant and how they are going to affect Nifty.
In one of the many possible ways, it is superior than that of Volume buildup is that, to determine volume is higher than previous volume, we have to wait for first few seconds/minutes/hours (depending on timeframe you are in) to see volume buildup. The Volume buildup function based indicator is kind of lagging, though volume itself being instant.
Nifty50 Participants - Top 25Nifty50 Index is calculated based on the movements of its participants. Every time you think of why is Index going up/down, who is actively dragging the index either ways, this Indicator gives you answer for the same in realtime!
This indicator will help you in pre-planning your trades based on the movements shown by different stocks of various sectors in Index calculation.
RSI column is an add-on to the participation table which will help you in getting RSI values of different stocks of Nifty 50 at a glance. You will see values getting updated in realtime in live market.
Checkout for customisations in indicator settings.
Note:
1. Participants present in this indicator and their participation percentage is taken from the official NSE website.
2. Table shows Top 25 participants by default. If you want to see less than 25 rows, you can update the input via indicator settings.
Feel free to contribute/comment changes if any! Comment in case of any suggestions :)
- Published by Soham Dixit
Bank Nifty ParticipantsBankNifty Index is calculated based on the movements of its participants. Every time you think of why is Index going up/down, who is actively dragging the index either ways, this Indicator gives you the answer for the same in realtime!
For example : You see HDFCBank and Kotak Bank significantly up while all other banks going down but index reacting in a bullish mode, the answer lies in which Bank is contributing how much to the index! This will help you in pre-planning your trades based on the movements shown by different banks in Index calculation. Or on the other hand, you see HDFCBank on verge of breakout and you have target of 10 points, this indicator will help you in identifying how much the index will react to the 10 points movement shown by HDFC Bank which is the leading participant in Bank Nifty.
RSI column is an add-on to the participation table which will help you in getting RSI values of different banks at a glance. You will see values getting updated in realtime in live market. Checkout for customisations in indicator settings.
Note : Participants present in this indicator and their participation percentage is taken from the official NSE website.
Feel free to contribute/comment changes if any!
- Published by Soham Dixit
nifty_alchemistTimeframe : 5 Min
*When Indicator show Buy signal look only for buy entries at CPR and 50 EMA High and low
*When Indicator show Sell signal look only for sell entries at CPR and 50 EMA High Low
for any quieries contact on twitter @nifty_alchemist
[CP]Pivot Boss Floor Pivots with ATR Dilation and Dynamic LevelsINTRODUCTION:
Compared to all the Pivot Indicators available on Trading View Public Library, this Floor Pivots Indicator differentiates itself in two major original ways:
Dilates the Pivot Support/Resistance Levels into Support/Resistance Bands based on volatility
Displays the S/R Levels Dynamically , that is, only those levels will be shown that are close enough to the price resulting in much cleaner looking charts.
There were a few features whose logic I had figured out, but I could not implement them due Pine Script’s Limitation (they should really work on increasing Pine Script’s capacity instead of adding more and more features to the language in order to make it look ‘better’):
Showing multiple timeframe pivots at the same time (not possible due to Pine Script’s limitation on the ‘Max Number of Outputs’ )
Automatic Detection of highly profitable Double Hot Pivot Zones (DPZ), also due to the ‘Max Number of Outputs’ limit
GENERAL USER INPUTS:
Most of the settings are self-explanatory, however, a few of them need some explanation:
Show Floor Pivots Dynamically – This will turn ON the dynamic pivot levels, please note that this function will work ONLY IN INTRADAY timeframes.
Dynamic Pivot ATR Period – Period over which the ATR value is calculated to show the pivots dynamically.
ATR Threshold for Dynamic Floor Pivots – Simply put, the indicator will start displaying Pivot Levels if they fall within the 2*ATR distance (default value) of the price. You can increase this number if the volatility increases and vice-versa.
Use ATR to Dilate Intraday Pivot Levels – This will turn ON Floor Pivot Dilation, turning pivot ‘lines’ into ‘bands’ .
ATR Dilation Factor – This number decides the width of the Pivot bands. Larger this number, thicker the bands. Typically, high volatility stocks will require a higher number.
ATR Period – Same as Dynamic Pivot ATR Period, but for Pivot Level Dilation.
INDICATOR USAGE EXAMPLES:
This indicator works great in conjunction with my Pivot Boss Candlestick Scanner indicator.
There are a lot of optimizations I have done in the code, although it looks trivial at first glance, but it's fairly complex.
Feel free to use it and modify it as you wish.
Here are a few examples where the indicator has shown great entries and exits, with the default settings:
NIFTY 5m Chart
Reliance 5m Chart
Tesla 5m Chart
Bitcoin-USDT 15m Chart
FINAL WORDS:
Please understand that I have Cherry Picked the examples to showcase the capability of the indicator and its usage.
DO NOT conflate the accuracy of examples with the accuracy of this indicator.
Once you start using floor pivots, you will realize that a lot of days simply don’t give any high probability setups and you will simply sit out of the market and do nothing (which is a good thing).
If you really want to learn how to use Pivots, read the book ’Secrets of a Pivot Boss’ . This book can change your life.
Nifty strike price 2/3σ Calculates the strike prices for the Nifty50 index in steps of 50 and marks the 2 and 3 sigma price levels.
Nifty Relative PerformanceDISCRIPTION:-
This indicator is used to determine relative performance of a stock based on different time intervals as well as compared to benchmark indices as Nifty 50,Nift IT, Nifty auto etc.
USE CASE SCENARIO:-
The top right table provide performance of stock based on different interval
while the bottom table depicts its relative performance compared to an index
eg:-
INFY compared to Nifty 50
&
INFY compared to Nifty IT
DISCLAIMER:-
if using an android device kindly toggle full-screen mode and view it horizontally
In desktop full screen mode may provide better comprehensive view
BankNifty - VWAP + StdDev Bands- By Default the script draws Daily VWAP for Bank Nifty based on Futures Volume or underlying Index Stocks based on user input
- Optionally one may Anchor it to Week/Month etc or anchor it from a particular Time.
- It also draws 3 Standard Deviation Bands from the VWAP based on User Input.
- Optionally draws Previous VWAP Close for and Bullish or Bearish Move.
- It works with NIFTY 50 as well but only using Futures Volume(Pine limitation to number of security calls) . Please change the Symbol and Futures Volume symbol to "NSE:NIFTY" and "NSE:NIFTY1!" NSE:BANKNIFTY NSE:NIFTY
Screener: Alpha & Beta IndexThis is a Index Screener which can short list the major Sectors contributing to NIFTY movement that day.
This helps in sector based trading, in which we can trade in the stocks which falls under that particular sector.
No need to roam around all the stocks in the whole watchlist.
It is recommended to create sector wise watchlist of all sectors. It will be easier to concentrate in only one sector.
For example in IT sector index there are certain stocks which contribute to the movement of IT sector.
This will be available in NSE (or exchange website).
For detailed description check out the descriptions in my previous 2 Alpha and Beta indicators.
Combine and use this screener with my previous Alpha & Beta indicator.
Nifty 20 VolumeThis script computes the volume for Nifty 50 index. I am using top 20 stocks here that constitute about 75% of the Nifty 50. I had used the script created by @shijithlal as a base for this. He has used all 45-50 stocks in his script. You can look that up if you want a more accurate volume.
Alpha & BetaHow to use Alpha(α)?
If Alpha is positive the stock outperforms, if the value is negative means the stock underperforms.
α < 0: The investment has earned too little for its risk (or, was too risky for the return)
α = 0: The investment has earned a return adequate for the risk taken
α > 0: The investment has a return in excess of the reward for the assumed risk
How to use Beta(β)?
β = 1: Exactly as volatile as the index
β > 1: More volatile than the index
β < 1 > 0: Less volatile than the index
β = 0: Uncorrelated to the index
β < 0: Negatively correlated to the index
β > 2: Trending stock
Higher the β higher risk/reward
Example: If the beta is 1.1, the share price is like to move by 10% more than the index
Trading Tip
Choose a stock with Alpha greater than 0 and Beta greater than 1.9 for intraday in 5min timeframe for long positions
Remember that such stocks will have high risk and high reward
Shortlist stocks with Beta greater than 1.9 for next day in 5min timeframe
Custom GAP UP scanner for NIFTY StocksThe security function can be called 40 times in a codescript. We can therefore scan about 40 stocks out of NIFTY 50 stocks with a single script.
This code can be modified to search for other scripts by changing the condition function
condition() => open > (close * 1.0025)
Only stocks which have gap up of 0.25% or more will be reported.
BNF VWAP & MAThe script picks up Bank nifty stocks with their current respective weights and plots a Volume Weighted Average Price ( VWAP ) line along with 2 EMAs of your choice and an alert when the EMAs cross over and also when price crosses VWAP .
You can customize the script for MA type and lengths and to remove alert. Basic utility of the script is to analyse volumes driving the Bank Nifty index.
Credits to @daytraderph and his script (Custom Volume ) who's code I used to build this script. Also thanks to my friend @Varun who helped me code it.