ATR Range Pivot LinesDescription:
This Pine Script calculates and plots pivot lines based on ATR (Average True Range) value and closing price. It uses the previous trading day's ATR value to set static pivot levels for the current trading day. These pivot lines help traders identify potential support and resistance levels based on historical volatility. The script includes two main pivot lines—ATR High and ATR Low —and two midpoint lines between them for additional context. Labels are added to show the exact pivot values, with options to customize label positions.
Intended Use:
The script is designed to help traders forecast potential price ranges for the current trading day based on the previous day’s volatility. By adding and subtracting the previous day's ATR from the prior close, the script identifies key levels where price action may encounter support or resistance. It is useful for setting realistic price targets or entry/exit points. Since the ATR-based pivot lines are static for the entire day, they provide a reliable range for intraday trading strategies.
Disclosure:
This script was generated using AI. It is recommended to review and test the script thoroughly before applying it in live trading scenarios.
Exitstrategy
Sublime Trading | Trailing StoplossWhat kind of traders/investors are we?
We are trend followers. Our scripts are designed to be used on the higher timeframes (weekly/daily) to catch the large moves/trends in the market.
Most have heard of long-term trend following. Few know how to execute the strategy.
Our scripts are designed specifically to identify and invest in long-term market trends.
What does this script do?
The exit from a position is arguably more important than the entry.
Traders/Investors will regularly find themselves in an asset based on some logic, but the exit management is very much an afterthought.
Hence why traders often take profit too early and hold onto losing positions. It is emotionally driven.
The Trailing Stoploss script is designed to remove the guesswork and show you precise levels you will want to consider exiting a position when an asset reverses.
How is the trailing stoploss produced?
The script uses the formula ATR 15 x 4.
We use ATR as it produces a stoploss which is unique to the volatility of the asset. The more volatile the asset, the wider the stoploss.
We use ATR 15 as it brings an average reading across half a month, incorporating days of extreme volatility.
The multiplier 4 works well to avoid positions being stopped out prematurely on pullbacks.
When the trailing stoploss is hit, this is where you will want to consider taking profit.
What is the best timeframe to use the script?
We recommend the daily timeframe as this is where trend followers enter assets to maximise the potential of long-term trends.
The higher timeframes are where traders and investors take fewer positions and hold for longer time periods.
The trailing stoploss follows the price of the asset a distance away to give the trend structure enough space and time to develop.
A trend is ultimately a function of time. If you eliminate time, you eliminate the trend. If you eliminate the trend, you eliminate profit.
The Trailing Stoploss script is necessary for investors who appreciate that profit is accumulated by letting winning positions run and not taking profit too early.
What makes this script unique?
Exit management and knowing when to let go of an asset is one of the main struggles budding investors face. This script has been coded specifically for the daily timeframe to:
Create a trailing stoploss that is unique to the volatility of the asset.
Allow investors to stay in positions for the duration of the trend over many months.
To distinguish between a pullback and a market reversal, allowing for discretion.
This TSL script is designed to manage positions investors take in line with long-term market trends.
Probability Box Rule of Thirds [PPI]█ Probability Box Rule of Thirds
The Probability Box Rule of Thirds , is a visual indicator that helps traders identify possible overbought and oversold conditions. It does this by dividing the price range – highest high minus the lowest low of a given lookback period or date range – into thirds. Each third has distinct probability characteristics and when combined represent a probability box.
We have spent years refining the probability box concept, and have previously published a How To on Trading View – "How to Trade Probability Ranges – The Critical Rule of 1/3" which can be found here:
To quickly summarize the How To – when using the Rule of Thirds , you are using a combination of statistics, probabilities of success, and prior price action to determine when to enter a trade. The visual range division helps remove subjectivity and clearly shows when the trading odds are stacked in your favor. By identifying and taking higher probability trades, you have a higher chance of success as trading is all about probability and risk management.
Implementing the Rule of Thirds starts with finding an instrument that is consolidating and identifying the nearest important support and resistance levels based on your targeted trading timeframe or lookback period.
The range between the support and resistance levels is divided into thirds to form three zones within the consolidation range.
When going LONG , you want to BUY in the bottom third of the range. Once you buy, your objective is to hold during the middle third and sell when the price enters the top third.
When you buy in the lower third, there's a 66.6% probability of success. If you buy in the middle third, you only have a 50% / 50% chance of success. Going long in the top third of the range gives you a 33.3% chance of success as you are already close to the identified resistance level.
When going SHORT , the sequence and odds are reversed. You want to SELL in the top third of the range, hold the middle third and exit in the bottom third of the range. This gives you a 66.6% chance of success when entering in the top third, a 50% / 50% chance when entering in the middle third, and a 33.3% chance in the bottom third given you are already close to the identified support level.
When the price lies in the middle third, the even 50% / 50% odds provide no probability edge and a trader is better off waiting until the price reaches the upper or lower thirds of the price range.
The Rule of Thirds allows us to quickly visually evaluate trades based on probabilities, selectively enter trades that have the highest odds of success, and avoid likely losing trades. The Rule of Thirds gives you confidence to hold trades based on prior trading ranges and provides clear levels where the prices are likely to either reverse or start trending.
The Probability Box Rule of Thirds automatically implements the first two steps of the Rule of Thirds by using the highest high and lowest low of a given lookback period to identify the support and resistance levels, and automatically divides the range into thirds. The rest of the Rule of Thirds rules remain the same.
Just having the price within the bottom thirds or top thirds, however, does not mean the price will immediately reverse. The GE chart below is an example of a stock that remained 'stuck' in the upper thirds of the price range for an extended amount of time:
And the CVS chart below is an example where the price is 'stuck' in the lower thirds of the price range:
While the price is in the upper or lower thirds, it is very important that the trader should use other indicators to identify when a significant trend reversal occurs. Once a trend reversal event happens, the trader either enters a trade AND/OR exits a trade if already in one.
When the price exceeds the bounds of the probability box, there are three possible outcomes – a strong continuation trend, the price consolidates around the probability box edge, or a trend reversal. Your favorite indicators will help determine which event is happening.
The CVS chart above is a good example of the probability box being exceeded with the last bar. The price exceeding the price range is temporary event as the price range will expand to encompass the revised price range on the next trading day.
█ Indicator Features
Each supported timeframe – Monthly, Weekly, and Daily – allows the selection of an appropriate lookback period for your trading style. The defaults are a good starting point for swing trading and long-term investing. You many need to experiment to find the optimal lookback period for your trading style.
Even if you only day trade, the Probability Box Rule of Thirds with the appropriate lookback periods can help you visualize the bigger picture of where the instrument is heading.
When viewing the charts, you can find the currently selected lookback period above the upper edge of the price range.
The indicator will display a dotted yellow line at 50% of the price range and show the line's value when requested.
The visibility of the actual thirds and border price values are controlled by the " Show Probability Box Values " checkbox. You may need to expand the chart's right margin to see the values.
The " Show Internal Labels " checkbox controls the display of the internal ⅓ Division labels and the percentage odds, along with the 50% label. This option by default is set to off.
The " Show Error Messages " checkbox controls the display of error messages and by default is turned on. Turn off to prevent error messages from being shown on intraday timeframes. Save as indicator default to prevent having to turn off this setting each time added to chart.
The color and transparency controls allow the user to modify the colors used for each third. The default settings are optimized for use with a DARK background.
█ Implementation Notes
IMPORTANT - the Probability Box Rule of Thirds is set up to only handle Monthly, Weekly and Daily charts. This is intentional as the indicator is designed to be used for safer multiple day and longer swing trades. When viewed on intraday charts, the indicator will be hidden.
The Probability Box Rule of Thirds uses a rolling window of the equivalent number of bars for the lookback period rather than relying on the bar starting and ending dates. This allows the use of a standard number of days in the selected lookback window across various instruments and ensures fast, efficient calculations.
The lookback periods are adjusted when non-standard timeframe multipliers are used – e.g., a 12M chart timeframe and a 3-year lookback period will result in a 3 bar lookback. Fractional bars in this calculation are rounded up and any incompatible lookback period and chart timeframe combination will generate a runtime error.
In summary, the Probability Box Rule of Thirds automates and visually identifies overbought and oversold areas, which combined with the Rule of Thirds probability risk profiles, increases your odds of success through better trade selections and higher confidence in your trades.
█ Disclaimer
There is substantial risk in trading. Losses incurred in trading can be significant. Only trade with money you can afford to lose. We make no claims whatsoever regarding the impact of past or future performance on your trading results.
RSI of Zero Lag MA (ValueRay)The RSI of a Zero Lag Moving Average a powerful tool for for reliable exit signals.
The Relative Strength Index (RSI) is a widely recognized momentum oscillator that measures the speed and change of price movements. It provides valuable insights into overbought and oversold conditions, enabling traders to identify potential reversal points and take advantage of market inefficiencies.
The RSI of a Zero Lag Indicator takes this concept a step further by incorporating the Zero Lag Moving Average. The Zero Lag Moving Average is a cutting-edge indicator that minimizes lag and provides a smoother representation of price action, allowing for quicker and more precise responses to market movements.
By combining the RSI with the Zero Lag Moving Average, this indicator offers traders a superior exit strategy. When the RSI reaches extreme levels of overbought or oversold conditions, it indicates a potential reversal in the market. The Zero Lag Moving Average further enhances this signal by reducing delays and providing timely exit points.
Moreover, the RSI of a Zero Lag Indicator is not limited to mean reversion strategies. While it excels in identifying mean reversion opportunities, it can also be used in conjunction with other trading approaches. Traders can take advantage of its objective signals to exit trades profitably, regardless of their chosen strategy.
With its ability to accurately pinpoint overbought and oversold conditions, the RSI of a Zero Lag Indicator offers traders a competitive edge in the market. By providing timely exit signals and minimizing lag, it helps traders optimize their trading decisions and increase their chances of success.
Consolidated IndicatorI have attempted to combine all the parameters to decide on the entry and exit points for stocks. The indicator combines
1) EMAs
2)PSAR
3)ATR
The script also attempts to show the risk-reward
CarlLibLibrary "CarlLib"
LastLowRedHighGreen(open, close, high, close, reqChangePerc) returns values representing the high of the most recent green and the low of the most recent red
Parameters:
open : open series
close : close series
high : high series
close : close series
reqChangePerc : the minimum require change percentage for the values to switch to new ones.
Returns:
DCA RSI Add funds exit simulatorThis script helps with planning on how to exit DCA deals that are in the negative.
The following deal information is required
- Current average position price
- Funds invested
- Required take profit
Additional indicator settings are
- The date/time on which to start the simulator
- Minimum deviation % to start adding funds
- Expected bounceback from when funds are added
The RSI trigger
Adding funds is triggered when the selected RSI settings yield a value that is at or beyond the selected threshold.
How it works
The amount of funds needed are calculated based on the supplied settings, such that the new average price matches the expected bounceback.
It will also show if the exit strategy has failed to hit the TP (this happens when the RSI threshold is hit again)