ATR Trailing Stop by GideonMATR Trailing Stop Indicator
This ATR Trailing Stop Indicator is designed for traders who wish to enhance their exit strategies by leveraging volatility-based stops. It offers a systematic approach to trend management and risk control, enabling traders to capture extended trends while protecting their capital during market reversals. Works on Indian Indices as well.
Overview:
The ATR Trailing Stop indicator is a dynamic trend-following tool that adjusts stop levels based on market volatility. By incorporating the Average True Range (ATR), the indicator provides a flexible exit strategy that adapts to changing market conditions, helping traders lock in profits during trends and limit losses during reversals.
How It Works:
True Range and ATR Calculation:
The indicator first calculates the True Range (TR) for each bar, defined as the maximum of:
The difference between the high and low,
The absolute difference between the high and the previous close, and
The absolute difference between the low and the previous close.
Using the TR values, the ATR is computed over a user-defined period (default is 14 bars) with an option to use either a Simple Moving Average (SMA) or an Exponential Moving Average (EMA) as the smoothing method.
Trailing Stop Determination:
Two potential stop levels are calculated:
For an uptrend, the stop is determined as:
Stop = Close – (Multiplier × ATR)
For a downtrend, the stop is:
Stop = Close + (Multiplier × ATR)
The indicator maintains a persistent trailing stop that dynamically adjusts:
In an uptrend, the trailing stop only moves upward (or remains flat) to secure gains.
In a downtrend, it only moves downward, thereby protecting the position from excessive losses.
A reversal in trend is identified when the price crosses the trailing stop level, at which point the indicator flips the trend and resets the stop level accordingly.
Rationale:
Utilizing the ATR for trailing stops ensures that the stop levels are directly influenced by market volatility. This dynamic adjustment helps accommodate the natural price fluctuations of the market, providing a more adaptive risk management tool compared to fixed stop-loss levels. The approach is particularly useful in volatile markets where traditional static stops might be triggered prematurely.
Customization:
Key parameters that can be adjusted include:
ATR Period: The number of bars used to calculate the ATR.
ATR Multiplier: The factor that determines how far the trailing stop is set from the current price.
Smoothing Method: Option to choose between SMA and EMA for ATR calculation, allowing traders to tailor the sensitivity of the indicator to their specific trading style.
Nseindia
Trend & ADX by Gideon for Indian MarketsThis indicator is designed to help traders **identify strong trends** using the **Kalman Filter** and **ADX** (Average Directional Index). It provides **Buy/Sell signals** based on trend direction and ADX strength. I wanted to create something for Indian markets since there are not much available.
In a nut-shell:
✅ **Buy when the Kalman Filter turns green, and ADX is strong.
❌ **Sell when the Kalman Filter turns red, and ADX is strong.
📌 **Ignore signals if ADX is weak (below threshold).
📊 Use on 5-minute timeframes for intraday trading.
------------------------------------------------------------------------
1. Understanding the Indicator Components**
- **Green Line:** Indicates an **uptrend**.
- **Red Line:** Indicates a **downtrend**.
- The **line color change** signals a potential **trend reversal**.
**ADX Strength Filter**
- The **ADX (orange line)** measures trend strength.
- The **blue horizontal line** marks the **ADX threshold** (default: 20).
- A **Buy/Sell signal is only valid if ADX is above the threshold**, ensuring a strong trend.
**Buy & Sell Signals**
- **Buy Signal (Green Up Arrow)**
- Appears **one candle before** the Kalman line turns green.
- ADX must be **above the threshold** (default: 20).
- Suggests entering a **long position**.
- **Sell Signal (Red Down Arrow)**
- Appears **one candle before** the Kalman line turns red.
- ADX must be **above the threshold** (default: 20).
- Suggests entering a **short position**.
2. Best Settings for 5-Minute Timeframe**
For day trading on the **5-minute chart**, the following settings work best:
- **Kalman Filter Length:** `50`
- **Process Noise (Q):** `0.1`
- **Measurement Noise (R):** `0.01`
- **ADX Length:** `14`
- **ADX Threshold:** `20`
- **(Increase to 25-30 for more reliable signals in volatile markets)**
3. How to Trade with This Indicator**
**Entry Rules**
✅ **Buy Entry**
- Wait for a **green arrow (Buy Signal).
- Kalman Line must **turn green**.
- ADX must be **above the threshold** (strong trend confirmed).
- Enter a **long position** on the next candle.
❌ **Sell Entry**
- Wait for a **red arrow (Sell Signal).
- Kalman Line must **turn red**.
- ADX must be **above the threshold** (strong trend confirmed).
- Enter a **short position** on the next candle.
**Exit & Risk Management**
📌 **Stop Loss**:
- Place stop-loss **below the previous swing low** (for buys) or **above the previous swing high** (for sells).
📌 **Take Profit:
- Use a **Risk:Reward Ratio of 1:2 or 1:3.
- Exit when the **Kalman Filter color changes** (opposite trend signal).
📌 **Avoid Weak Trends**:
- **No trades when ADX is below the threshold** (low trend strength).
4. Additional Tips
- Works best on **liquid assets** like **Bank Nifty, Nifty 50, and large-cap stocks**.
- **Avoid ranging markets** with low ADX values (<20).
- Use alongside **volume analysis and support/resistance levels** for confirmation.
- Experiment with **ADX Threshold (increase for stronger signals, decrease for more trades).**
Best of Luck traders ! 🚀
Options Cumulative Chart AnalysysThis Pine Script is a comprehensive tool designed for traders analyzing options data on TradingView. It aggregates multiple symbols to calculate and visualize cumulative performance, providing essential insights for decision-making.
Key Features:
Symbol and Strike Price Configuration:
Supports up to four configurable symbols (e.g., NIFTY options).
Allows defining buy/sell actions, quantities, and entry premiums for each symbol.
Customizable Chart Display:
Plot candlesticks and line charts for cumulative data.
Configurable Exponential Moving Averages (EMAs) for technical analysis.
Entry and price lines with customizable colors.
Timeframe Management:
Supports higher timeframe (HTF) candles.
Ensures compatibility with the current chart timeframe to maintain accuracy.
Dynamic Coloring and Visualization:
Red, green, and gray color schemes for body and wicks of candlesticks based on price movements.
Customizable positive and negative color schemes.
Table for Data Representation:
Displays an info table showing symbols, quantities, entry prices, and latest traded prices (LTP).
Adjustable table position, overlay, and styling.
Premium and Profit/Loss Calculations:
Calculates cumulative open, high, low, and close prices considering premiums and quantities.
Tracks the profit and loss dynamically based on cumulative premiums and market prices.
Alerts and Notifications:
Alerts triggered on specific conditions, such as when the profit/loss turns negative.
Modular Functions:
Functions for calculating high/low/open/close values, combining premiums, and drawing candlesticks.
Utilities for symbol management and security requests.
Custom Settings:
Includes a wide range of input options for customization:
Timeframes, EMA lengths, colors, table configurations, and more.
Error Handling:
Validates timeframe inputs to ensure compatibility and prevent runtime errors.
This script is designed for advanced traders looking for a customizable tool to analyze cumulative options data efficiently. By leveraging its modular design and visual elements, users can make informed trading decisions with a holistic view of market movements.
Leg/Base & GAP CandlesThis script, redraws the Minute, Hourly, Daily, Weekly, Monthly candles for gap up and gap down situation. Also this candle marks the LEG candles and BASE Candles with different colors to mark the supply and demand zone.
This script is only for Indian NSE markets (09:15 to 15:30) for GAP up/GAP down redraw.
This script is most beneficial for TradeLegend students.
This script is originally made by me, and no code has been modified or copied from anywhere else except Pinescript documentation.
Future TimevalueThis indicator plots a chart of future timevalue for all NSE index and NSE FNO Stock. It plots the difference of future and spot's 1min candle close price.
Just open any index or stock spot chart in 1 min timeframe(works with higher tf also) and add the indicator.
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.
ChartAdvise_Action_ReactionThis script has finetuned the dynamic shifting of prices seen in the previous script.