EMA Trend Bars + Optional VWAP GateIndicator: EMA Trend Bars + Optional VWAP Gate
What it does
• Colors your bars green (up), red (down), or gray (neutral) based on whether price is above or below a chosen EMA.
• Adds an optional VWAP filter (gate): only confirms green if price is above both EMA and VWAP, red if below both.
• Lets you pick source (HLC3, Close, or Heikin Ashi) to align with your charting style.
• Plots the EMA and (optionally) VWAP for reference.
• Includes alerts when the trend flips from down → up or up → down (static text, TradingView-friendly).
• Has an optional buffer (in ticks) so you don’t get whipsawed right at the EMA line.
⸻
KISS (Keep It Simple, Stupid)
The whole idea is to strip away noise and keep the system as lean as possible:
• One trend line (EMA) → simple bias filter.
• One value anchor (VWAP) → session’s fair price.
• Clean colors (green/red/gray) → quick glance = instant bias.
• No complex confluence stacks → less decision fatigue.
• Optional buffer → avoids chop without adding unnecessary rules.
The KISS principle here: price vs EMA + optional VWAP gate = trend bias. That’s it.
⸻
How to use it
1. Pick your EMA length:
• 34 is a balanced default for intraday scalping.
• Shorter (e.g., 21) = faster, more flips.
• Longer (e.g., 55/89) = slower, smoother trend.
2. Decide if VWAP filter stays ON:
• VWAP ON = fewer trades, higher confluence (good for patient entries).
• VWAP OFF = more trades, may catch earlier flips (good for fast scalping).
3. Read the bars:
• Green = only look for longs.
• Red = only look for shorts.
• Gray = stand aside (conflict or chop).
4. Alerts:
• Add “Trend Up” or “Trend Down” alerts for quick bias changes.
• Best used for heads-up, not blind auto-entries.
5. Buffer setting:
• 0 ticks = raw flips at EMA.
• 1–2 ticks = prevents micro whipsaws.
• Adjust depending on your instrument’s volatility (NQ is spikier, MES smoother).
المؤشرات والاستراتيجيات
Precision Candle Marker – OL/OH/OC ScreenerThis indicator highlights high-probability precision candles on any perpetual contract, designed especially for scalpers and short-term traders.
It marks three unique candle setups on the 1-minute chart (works on other timeframes too):
🟢 Open = Low (OL) → Strong bullish momentum, buyers took control instantly.
🔴 Open = High (OH) → Strong bearish momentum, sellers took control instantly.
🔵 Open = Close (OC) → Doji / indecision candle, potential reversal or continuation signal.
Use cases:
Identify breakout entry points in uptrend/downtrend.
Filter noise and focus on precision candles.
Combine with trend indicators (EMA, VWAP, RSI) for confirmation.
This tool is best suited for scalping perpetual contracts (e.g., BTCUSDT, ETHUSDT) but works on any symbol and timeframe.
Bullish_Mayank_entry_Indicator with AlertsThis indiucator gives buy signal alerts using EMAs, RSI & Weighted Moving Average of RSI & also multiframe analysis
Weinstein Stage Analyzer — Table Only (more padding)What it does
This indicator applies Stan Weinstein’s Stage Analysis (Stages 1–4) and presents the result in a clean, compact table only—no lines, labels, or overlays. It shows:
• Previous Stage
• Current Stage (with Early / Mature / Late tag)
• Duration (how long price has been in the current stage, in HTF bars)
• Sentiment (Bullish / Bearish / Balanced / Cautious, derived from stage & maturity)
Timeframe-aware logic
• Weekly charts: classic 30-period MA (Weinstein’s original 30-week concept).
• Daily & Intraday: computed on Daily 150 as a practical daily translation of the 30-week idea.
• Monthly: ~7-period MA (~30 weeks ≈ 7 months).
The stage classification itself is evaluated on this HTF context and then displayed on your active chart.
EMA/SMA toggle
Choose EMA (default) or SMA for the trend line used in stage detection.
How stages are decided (practical rules)
• Stage 2 (Advance): MA rising with price above an upper band.
• Stage 4 (Decline): MA falling with price below a lower band.
• Flat MA zones become Stage 1 (Base) or Stage 3 (Top) depending on the prior trend.
“Maturity” tags (Early/Mature/Late) come from run length and extension beyond the band.
Inputs you can tweak
• MA Type: EMA / SMA
• Price Band (±%) and Slope Threshold to tighten/loosen stage flips
• Maturity thresholds: min/max bars & late-extension %
Notes
• Duration is for the entire current stage (e.g., total time in Stage 4), not just the maturity slice.
• A Top Padding Rows input is included to nudge the table lower if it overlaps your OHLC readout.
Disclaimer
For educational use only. Not financial advice. Always confirm with your own analysis, risk management, and market context.
Bullish_Mayank_entry_IndicatorThis indicator works on finding bullish momemtum using EMAs, RSIs amd Weighted Moving Average of RSI
NX - ICT PD ArraysThis Pine Script indicator identifies and visualizes Fair Value Gaps (FVGs) and Order Blocks (OBs) based on refined price action logic.
FVGs are highlighted when price leaves an imbalance between candles, while Order Blocks are detected using ICT methodology—marking the last opposing candle before a displacement move.
The script dynamically tracks and updates these zones, halting box extension once price interacts with them. Customizable colors and lookback settings allow traders to tailor the display to their strategy.
EMA / WMA RibbonMomentum Flow Ribbon
Unlock a clear, visual edge in identifying short-term momentum shifts with the Momentum Flow Ribbon.
This indicator was born from a simple yet powerful concept: to visually represent the dynamic relationship between a fast-reacting Exponential Moving Average (EMA) and the smoother, more methodical Wilder's Moving Average (WMA). While both moving averages use the same length, their unique calculation methods cause them to separate and cross, creating a "ribbon" that provides an immediate and intuitive gauge of market momentum.
This tool is designed for the disciplined trader who values clean charts and actionable signals, helping you to execute your strategies with greater confidence and precision.
How It Works
The script plots an EMA and a Wilder's Moving Average (referred to as rma in Pine Script) of the same length. The space between these two lines is then filled with a colored ribbon:
Bullish Green/Teal: The ribbon turns bullish when the faster EMA crosses above the slower Wilder's MA, indicating that short-term momentum is strengthening to the upside.
Bearish Red: The ribbon turns bearish when the EMA crosses below the Wilder's MA, signaling that short-term momentum is shifting to the downside.
The inherent "lag" of the Wilder's MA, a feature designed by J. Welles Wilder Jr. himself, acts as a steady baseline against which the more sensitive EMA can be measured. The result is a simple, zero-lag visual that filters out insignificant noise and highlights meaningful changes in trend direction.
Key Features
Customizable Length and Source: Easily adjust the moving average length and price source (close, hl2, etc.) to fit your specific trading style and the instrument you are trading, from futures like MES and MNQ to cryptocurrencies and forex.
Customizable Colors: Tailor the ribbon's bullish and bearish colors to match your personal chart aesthetic.
Built-in Alerts: The script includes pre-configured alerts for both bullish (EMA crosses above WMA) and bearish (EMA crosses below WMA) signals. Never miss a potential momentum shift again.
Clean & Lightweight: No clutter. Just a simple, effective ribbon that integrates seamlessly into any trading system.
Practical Application for the Discerning Trader
For a futures trader, timing is everything. This ribbon is not just another indicator; it's a tool for confirmation.
Imagine you've identified a key level—a Volume Profile POC, the previous day's low, or a critical accumulation zone. As price approaches this level pre-London session, you're watching for a sign of institutional activity. A flip in the ribbon's color at that precise moment can provide the powerful confirmation you need to enter a trade, trusting that you are aligning with the building liquidity and momentum heading into the New York open.
This is a tool for those who aspire to greatness in their trading—who understand that the edge is found not in complexity, but in the flawless execution of a simple, well-defined plan.
Add the Momentum Flow Ribbon to your chart and start seeing momentum in a clearer light.
Fibo RSIThis is a customized Relative Strength Index (RSI) indicator designed to replicate TradingView’s default RSI while adding additional reference levels for deeper market analysis.
🔹 Features:
RSI length set to 8 by default (user adjustable).
Calculates RSI using the standard ta.rsi() function.
Plots the RSI line in a clean, separate panel.
Adds 7 key levels for analysis: 0, 20, 30, 50, 70, 80, 100.
Levels are drawn as thin, solid straight lines for a cleaner look (instead of default dashed).
🔹 Use cases:
Identify momentum shifts with enhanced precision.
Use intermediate levels (20, 30, 50, 70, 80) as potential support/resistance zones.
Ideal for traders who want a Fibonacci-like structure in RSI analysis.
WickDomits wickdom, thats all you need to know! it tells when the candle is in control and when its not
RSI HIGHs and LOWs MarkerThis indicator marks significant RSI (14) pivot points directly on the price chart.
Red markers above candles highlight confirmed RSI highs where the RSI value exceeded 75 (overbought zone).
Green markers below candles highlight confirmed RSI lows where the RSI value dropped below 25 (oversold zone).
These signals help traders quickly identify potential reversal zones and overextended market conditions without having to monitor the RSI window separately.
RSI DCA StrategyThis strategy combines RSI oversold signals with a Dollar-Cost Averaging (DCA) buying approach.
Trigger:
When the RSI (Relative Strength Index) crosses below 30, the strategy marks an oversold condition.
DCA Entry:
Once triggered, the strategy executes up to three consecutive daily entries (1 per day), splitting the predefined capital equally (configurable by user).
Position Management:
Take Profit at a configurable % above the average entry price.
Stop Loss at a configurable % below the average entry price.
Exit Conditions:
The strategy automatically exits either on reaching Take Profit or Stop Loss.
Visualization:
RSI plotted with oversold line (30).
Take Profit and Stop Loss lines displayed after entry.
Performance Reporting:
Includes an optional monthly performance table for evaluating results by month.
Note:
This strategy is for testing RSI-based mean reversion with staggered entries. It is not financial advice and should be optimized and validated for each market or timeframe before practical use.
Renko Trend Indicator with High/LowRenko Trend Indicator with High/Low
Version: 1.0
Pine Script Version: 5
Type: Indicator
Overlay: Yes
Description
The Renko Trend Indicator with High/Low provides a visual representation of market trends using Renko-style calculations based on either a fixed brick size or ATR (Average True Range). It helps traders identify trend direction, potential reversals, and key support/resistance levels.
The indicator plots Renko-based trend signals directly on your chart and provides a colored Renko close line, making trend analysis simpler and clearer.
Features
Customizable Renko Brick Size
Fixed brick size or dynamic ATR-based bricks.
Step input for precise control over brick size.
Trend Identification
Detects uptrend and downtrend based on Renko logic.
Plots visual signals for trend direction:
Green triangle below bars → Uptrend
Red triangle above bars → Downtrend
Renko Close Line
Shows the Renko-adjusted closing price as a line.
Line color changes with trend (green for uptrend, red for downtrend).
Inputs
Name Type Default Description
Brick Size float 50 Size of Renko bricks (price units)
Use ATR for Brick Size? bool false Enable ATR-based dynamic brick sizing
ATR Period int 14 Number of periods for ATR calculation if enabled
How It Works
The indicator calculates Renko bricks using either a fixed size or ATR.
It maintains internal variables:
renko_close → Current Renko price
renko_high → Highest point of the current trend
renko_low → Lowest point of the current trend
trend → Current trend direction (1 for uptrend, -1 for downtrend)
last_extreme → Last extreme point to detect trend reversal
When price moves above or below the Renko threshold, the trend is updated.
Trend signals are plotted on the chart for easy visualization.
Plots
Plot Name Description Color
Up Trend Triangle below bar when trend is up Green
Down Trend Triangle above bar when trend is down Red
Renko Close Line connecting Renko-adjusted close prices Green (up) / Red (down)
Usage
Add the indicator to any chart with your preferred timeframe.
Configure the brick size or enable ATR-based bricks for dynamic calculation.
Observe the trend triangles and Renko line to identify trend direction and potential reversals.
Can be used in combination with other indicators or strategies for trading decisions.
Notes
This indicator is for analysis purposes only and does not place trades automatically.
ATR-based bricks adapt to market volatility, while fixed bricks provide a static reference.
Works best on liquid markets with regular price movements.
Example Chart
Green triangles below bars signal a buying trend.
Red triangles above bars signal a selling trend.
The colored Renko line shows the trend progression visually.
Author
DB
Pine Script Version: 5
License: MIT
Auto Fibonacci - First Hour Lockedthis gives the accurate fibonnacci based on the day's first hour high/low values, and the extension values as well.
MACD, RSI & Stoch + Divergences (RU)WARNING: This script is fully localized in Russian and is supported by the Russian-speaking community. All tooltips, settings, and descriptions are provided in Russian for maximum usability by Russian-speaking users.
This script combines MACD, RSI, and Stochastic oscillators with automatic detection and visualization of regular and hidden divergences. It highlights potential reversal and trend continuation points, draws divergence lines and labels, and provides flexible settings for trend analysis and oscillator calculation. The script also includes advanced session timing and daily change visualization for intraday trading.
Данный скрипт объединяет индикаторы MACD, RSI и Стохастик, а также автоматически определяет и визуализирует обычные и скрытые дивергенции. Он выделяет потенциальные точки разворота и продолжения тренда, строит линии и метки дивергенций, а также предоставляет гибкие настройки для анализа тренда и расчёта осцилляторов.
Скрипт дополнительно отображает временные торговые сессии и динамику дневных изменений для удобства внутридневной торговли. Все параметры снабжены подробными русскоязычными подсказками (тултипами), что делает работу с инструментом максимально понятной и удобной для русскоязычных пользователей.
First Window Box + Asia Open HourFirst Window Box + Asia Open Hour is an indicator which marks the High and Low of the Asia Open First hour along with the range marking of First Four Hour and its lenght comparing to the length of last 10 days first four hour range.
Adaptive Gap Bands - DolphinTradeBot1️⃣ Overview
Adaptive Gap Bands is a momentum indicator that measures the percentage difference between fast and slow moving averages. This helps identify potential overbought or oversold zones.
The goal is to analyze “gap” behaviors within a trend and generate clearer entry–exit signals.
Since the bands are anchored to the slow moving average, they are more sensitive to the trend direction, making signals stronger in line with the prevailing trend.
📌 Signals do not repaint — once confirmed, they remain fixed on the chart.
2️⃣ How It Works ?
The indicator tracks the distance between fast and slow MAs.
The indicator measures the percentage gap between the fast and slow moving averages, relative to the slow MA.
Each time the gap reaches a new extreme during a swing, that value is stored.
When the averages cross, the stored values from the last N swings (defined by Swing Count) are collected.
These gap values are then averaged to create a smoother and more adaptive reference.
The bands are built by multiplying this average gap with the % Multiplier and projecting it around the slow MA.
3️⃣ How to Use It ?
Add the script to your chart.
Green label → potential Long signal.
Red label → potential Short signal.
Signals often appear when price moves outside the adaptive bands, showing extreme momentum.
Can also be used as a reference tool in manual trades to set profit/loss expectations.
By comparing upward vs. downward gaps, it can help analyze and confirm the dominant trend direction.
4️⃣⚙️ Settings
Swing Count → Number of past swings considered.
% Multiplier → Adjusts band width (narrower or wider).
MA Lengths & Types → Choose fast and slow moving averages (EMA, SMA, RMA, etc.).
ApicodeLibrary "Apicode"
percentToTicks(percent, from)
Converts a percentage of the average entry price or a specified price to ticks when the
strategy has an open position.
Parameters:
percent (float) : (series int/float) The percentage of the `from` price to express in ticks, e.g.,
a value of 50 represents 50% (half) of the price.
from (float) : (series int/float) Optional. The price from which to calculate a percentage and convert
to ticks. The default is `strategy.position_avg_price`.
Returns: (float) The number of ticks within the specified percentage of the `from` price if
the strategy has an open position. Otherwise, it returns `na`.
percentToPrice(percent, from)
Calculates the price value that is a specific percentage distance away from the average
entry price or a specified price when the strategy has an open position.
Parameters:
percent (float) : (series int/float) The percentage of the `from` price to use as the distance. If the value
is positive, the calculated price is above the `from` price. If negative, the result is
below the `from` price. For example, a value of 10 calculates the price 10% higher than
the `from` price.
from (float) : (series int/float) Optional. The price from which to calculate a percentage distance.
The default is `strategy.position_avg_price`.
Returns: (float) The price value at the specified `percentage` distance away from the `from` price
if the strategy has an open position. Otherwise, it returns `na`.
percentToCurrency(price, percent)
Parameters:
price (float) : (series int/float) The price from which to calculate the percentage.
percent (float) : (series int/float) The percentage of the `price` to calculate.
Returns: (float) The amount of the symbol's currency represented by the percentage of the specified
`price`.
percentProfit(exitPrice)
Calculates the expected profit/loss of the open position if it were to close at the
specified `exitPrice`, expressed as a percentage of the average entry price.
NOTE: This function may not return precise values for positions with multiple open trades
because it only uses the average entry price.
Parameters:
exitPrice (float) : (series int/float) The position's hypothetical closing price.
Returns: (float) The expected profit percentage from exiting the position at the `exitPrice`. If
there is no open position, it returns `na`.
priceToTicks(price)
Converts a price value to ticks.
Parameters:
price (float) : (series int/float) The price to convert.
Returns: (float) The value of the `price`, expressed in ticks.
ticksToPrice(ticks, from)
Calculates the price value at the specified number of ticks away from the average entry
price or a specified price when the strategy has an open position.
Parameters:
ticks (float) : (series int/float) The number of ticks away from the `from` price. If the value is positive,
the calculated price is above the `from` price. If negative, the result is below the `from`
price.
from (float) : (series int/float) Optional. The price to evaluate the tick distance from. The default is
`strategy.position_avg_price`.
Returns: (float) The price value at the specified number of ticks away from the `from` price if
the strategy has an open position. Otherwise, it returns `na`.
ticksToCurrency(ticks)
Converts a specified number of ticks to an amount of the symbol's currency.
Parameters:
ticks (float) : (series int/float) The number of ticks to convert.
Returns: (float) The amount of the symbol's currency represented by the tick distance.
ticksToStopLevel(ticks)
Calculates a stop-loss level using a specified tick distance from the position's average
entry price. A script can plot the returned value and use it as the `stop` argument in a
`strategy.exit()` call.
Parameters:
ticks (float) : (series int/float) The number of ticks from the position's average entry price to the
stop-loss level. If the position is long, the value represents the number of ticks *below*
the average entry price. If short, it represents the number of ticks *above* the price.
Returns: (float) The calculated stop-loss value for the open position. If there is no open position,
it returns `na`.
ticksToTpLevel(ticks)
Calculates a take-profit level using a specified tick distance from the position's average
entry price. A script can plot the returned value and use it as the `limit` argument in a
`strategy.exit()` call.
Parameters:
ticks (float) : (series int/float) The number of ticks from the position's average entry price to the
take-profit level. If the position is long, the value represents the number of ticks *above*
the average entry price. If short, it represents the number of ticks *below* the price.
Returns: (float) The calculated take-profit value for the open position. If there is no open
position, it returns `na`.
calcPositionSizeByStopLossTicks(stopLossTicks, riskPercent)
Calculates the entry quantity required to risk a specified percentage of the strategy's
current equity at a tick-based stop-loss level.
Parameters:
stopLossTicks (float) : (series int/float) The number of ticks in the stop-loss distance.
riskPercent (float) : (series int/float) The percentage of the strategy's equity to risk if a trade moves
`stopLossTicks` away from the entry price in the unfavorable direction.
Returns: (int) The number of contracts/shares/lots/units to use as the entry quantity to risk the
specified percentage of equity at the stop-loss level.
calcPositionSizeByStopLossPercent(stopLossPercent, riskPercent, entryPrice)
Calculates the entry quantity required to risk a specified percentage of the strategy's
current equity at a percent-based stop-loss level.
Parameters:
stopLossPercent (float) : (series int/float) The percentage of the `entryPrice` to use as the stop-loss distance.
riskPercent (float) : (series int/float) The percentage of the strategy's equity to risk if a trade moves
`stopLossPercent` of the `entryPrice` in the unfavorable direction.
entryPrice (float) : (series int/float) Optional. The entry price to use in the calculation. The default is
`close`.
Returns: (int) The number of contracts/shares/lots/units to use as the entry quantity to risk the
specified percentage of equity at the stop-loss level.
exitPercent(id, lossPercent, profitPercent, qty, qtyPercent, comment, alertMessage)
A wrapper for the `strategy.exit()` function designed for creating stop-loss and
take-profit orders at percentage distances away from the position's average entry price.
NOTE: This function calls `strategy.exit()` without a `from_entry` ID, so it creates exit
orders for *every* entry in an open position until the position closes. Therefore, using
this function when the strategy has a pyramiding value greater than 1 can lead to
unexpected results. See the "Exits for multiple entries" section of our User Manual's
"Strategies" page to learn more about this behavior.
Parameters:
id (string) : (series string) Optional. The identifier of the stop-loss/take-profit orders, which
corresponds to an exit ID in the strategy's trades after an order fills. The default is
`"Exit"`.
lossPercent (float) : (series int/float) The percentage of the position's average entry price to use as the
stop-loss distance. The function does not create a stop-loss order if the value is `na`.
profitPercent (float) : (series int/float) The percentage of the position's average entry price to use as the
take-profit distance. The function does not create a take-profit order if the value is `na`.
qty (float) : (series int/float) Optional. The number of contracts/lots/shares/units to close when an
exit order fills. If specified, the call uses this value instead of `qtyPercent` to
determine the order size. The exit orders reserve this quantity from the position, meaning
other orders from `strategy.exit()` cannot close this portion until the strategy fills or
cancels those orders. The default is `na`, which means the order size depends on the
`qtyPercent` value.
qtyPercent (float) : (series int/float) Optional. A value between 0 and 100 representing the percentage of the
open trade quantity to close when an exit order fills. The exit orders reserve this
percentage from the open trades, meaning other calls to this command cannot close this
portion until the strategy fills or cancels those orders. The percentage calculation
depends on the total size of the applicable open trades without considering the reserved
amount from other `strategy.exit()` calls. The call ignores this parameter if the `qty`
value is not `na`. The default is 100.
comment (string) : (series string) Optional. Additional notes on the filled order. If the value is specified
and not an empty "string", the Strategy Tester and the chart show this text for the order
instead of the specified `id`. The default is `na`.
alertMessage (string) : (series string) Optional. Custom text for the alert that fires when an order fills. If the
value is specified and not an empty "string", and the "Message" field of the "Create Alert"
dialog box contains the `{{strategy.order.alert_message}}` placeholder, the alert message
replaces the placeholder with this text. The default is `na`.
Returns: (void) The function does not return a usable value.
closeAllAtEndOfSession(comment, alertMessage)
A wrapper for the `strategy.close_all()` function designed to close all open trades with a
market order when the last bar in the current day's session closes. It uses the command's
`immediately` parameter to exit all trades at the last bar's `close` instead of the `open`
of the next session's first bar.
Parameters:
comment (string) : (series string) Optional. Additional notes on the filled order. If the value is specified
and not an empty "string", the Strategy Tester and the chart show this text for the order
instead of the automatically generated exit identifier. The default is `na`.
alertMessage (string) : (series string) Optional. Custom text for the alert that fires when an order fills. If the
value is specified and not an empty "string", and the "Message" field of the "Create Alert"
dialog box contains the `{{strategy.order.alert_message}}` placeholder, the alert message
replaces the placeholder with this text. The default is `na`.
Returns: (void) The function does not return a usable value.
closeAtEndOfSession(entryId, comment, alertMessage)
A wrapper for the `strategy.close()` function designed to close specific open trades with a
market order when the last bar in the current day's session closes. It uses the command's
`immediately` parameter to exit the trades at the last bar's `close` instead of the `open`
of the next session's first bar.
Parameters:
entryId (string)
comment (string) : (series string) Optional. Additional notes on the filled order. If the value is specified
and not an empty "string", the Strategy Tester and the chart show this text for the order
instead of the automatically generated exit identifier. The default is `na`.
alertMessage (string) : (series string) Optional. Custom text for the alert that fires when an order fills. If the
value is specified and not an empty "string", and the "Message" field of the "Create Alert"
dialog box contains the `{{strategy.order.alert_message}}` placeholder, the alert message
replaces the placeholder with this text. The default is `na`.
Returns: (void) The function does not return a usable value.
sortinoRatio(interestRate, forceCalc)
Calculates the Sortino ratio of the strategy based on realized monthly returns.
Parameters:
interestRate (simple float) : (simple int/float) Optional. The *annual* "risk-free" return percentage to compare against
strategy returns. The default is 2, meaning it uses an annual benchmark of 2%.
forceCalc (bool) : (series bool) Optional. A value of `true` forces the function to calculate the ratio on the
current bar. If the value is `false`, the function calculates the ratio only on the latest
available bar for efficiency. The default is `false`.
Returns: (float) The Sortino ratio, which estimates the strategy's excess return per unit of
downside volatility.
sharpeRatio(interestRate, forceCalc)
Calculates the Sharpe ratio of the strategy based on realized monthly returns.
Parameters:
interestRate (simple float) : (simple int/float) Optional. The *annual* "risk-free" return percentage to compare against
strategy returns. The default is 2, meaning it uses an annual benchmark of 2%.
forceCalc (bool) : (series bool) Optional. A value of `true` forces the function to calculate the ratio on the
current bar. If the value is `false`, the function calculates the ratio only on the latest
available bar for efficiency. The default is `false`.
Returns: (float) The Sortino ratio, which estimates the strategy's excess return per unit of
total volatility.
inside forex vip📌 SuperTrend
Based on:
ATR Period (default 10).
Multiplier ATR (default 3).
Calculates the trend direction (upward/downward).
Generates buy/sell signals:
Buy: Positive crossover with EMA color matching (bullish).
Sell: Negative crossover with EMA color matching (bearish).
Smart Money Concepts with RSI/MA Signalit gives an alert when price is in bullish ob and rsi crossover SMA
Daily + 4H MACD & RSI Screeneri used this script for my swing trading entry.
//@version=5
indicator("Daily + 4H MACD & RSI Screener", overlay=false)
// settings
rsiLength = input.int(14, "RSI Length")
rsiLevel = input.int(50, "RSI Threshold")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
// ---- daily timeframe ----
dailyRsi = request.security(syminfo.tickerid, "D", ta.rsi(close, rsiLength))
= request.security(syminfo.tickerid, "D", ta.macd(close, macdFast, macdSlow, macdSignal))
dailyRsiPass = dailyRsi < rsiLevel
dailyMacdPass = dailyMacd < 0
dailyCondition = dailyRsiPass and dailyMacdPass
// ---- 4H timeframe ----
h4Rsi = request.security(syminfo.tickerid, "240", ta.rsi(close, rsiLength))
= request.security(syminfo.tickerid, "240", ta.macd(close, macdFast, macdSlow, macdSignal))
h4RsiPass = h4Rsi < rsiLevel
h4MacdPass = h4Macd < 0
h4Condition = h4RsiPass and h4MacdPass
// ---- combined condition ----
finalCondition = dailyCondition and h4Condition
// plot signals
plotshape(finalCondition, style=shape.triangledown, location=location.top, color=color.red, size=size.large, title="Signal")
bgcolor(finalCondition ? color.new(color.red, 85) : na)
// ---- table (3 columns x 4 rows) ----
var table statusTable = table.new(position=position.top_right, columns=3, rows=4, border_width=1)
// headers
table.cell(statusTable, 0, 0, "Timeframe", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 0, "RSI", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 2, 0, "MACD", text_color=color.white, bgcolor=color.new(color.black, 0))
// daily row
table.cell(statusTable, 0, 1, "Daily", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 1, str.tostring(dailyRsi, "#.##"),
text_color=color.white, bgcolor=dailyRsiPass ? color.new(color.green, 60) : color.new(color.red, 60))
table.cell(statusTable, 2, 1, str.tostring(dailyMacd, "#.##"),
text_color=color.white, bgcolor=dailyMacdPass ? color.new(color.green, 60) : color.new(color.red, 60))
// 4H row
table.cell(statusTable, 0, 2, "4H", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 2, str.tostring(h4Rsi, "#.##"),
text_color=color.white, bgcolor=h4RsiPass ? color.new(color.green, 60) : color.new(color.red, 60))
table.cell(statusTable, 2, 2, str.tostring(h4Macd, "#.##"),
text_color=color.white, bgcolor=h4MacdPass ? color.new(color.green, 60) : color.new(color.red, 60))
// status row (simulate colspan by using two adjacent cells with the same bgcolor)
table.cell(statusTable, 0, 3, "Status", text_color=color.white, bgcolor=color.new(color.black, 0))
statusText = finalCondition ? "match" : "no match"
statusBg = finalCondition ? color.new(color.green, 0) : color.new(color.red, 0)
table.cell(statusTable, 1, 3, statusText, text_color=color.white, bgcolor=statusBg, text_size=size.large)
table.cell(statusTable, 2, 3, "", text_color=color.white, bgcolor=statusBg)
TQQQ – 200 SMA ±5% Entry / –3% Exit (since 2010) • Metrics by DE✅ In plain words:
You only buy TQQQ when it’s trading 5% above its 200-day SMA (a sign of strong uptrend momentum).
You stay long as long as the price holds above 3% below the 200-day SMA.
If price falls below that lower threshold, you exit to limit drawdown.
The strategy is designed to catch strong uptrends while cutting losses early.
TPO Levels [VAH/POC/VAL] with Poor H/L, Single Prints & NPOCs### 🎯 Advanced Market Profile & Key Level Analysis
This script is a unique and comprehensive technical analysis tool designed to help traders understand market structure, value, and key liquidity levels using the principles of **Auction Market Theory** and **Market Profile**.
This script is unique (and shouldn't be censored) because :
It allows large history of levels to be displayed
Accurate as possible tick size
Doesn't draw a profile but only the actual levels
Supports multi-timeframe levels even on the daily mode giving macro context
There is no indicator out there that does it
While these concepts are universal, this indicator was built primarily for the dynamic, 24/7 nature of the **cryptocurrency market**. It helps you move beyond simple price action to understand *why* the market is moving, which is especially crucial in the volatile crypto space.
### ## 📊 The Concepts Behind the Calculations
To use this script effectively, it's important to understand the core concepts it is built upon. The entire script is self-contained and does not require other indicators.
* **What is Market Profile?**
Market Profile is a unique charting technique that organizes price and time data to reveal market structure. It's built from **Time Price Opportunities (TPOs)**, which are 30-minute periods of market activity. By stacking these TPOs, the script builds a distribution, showing which price levels were most accepted (heavily traded) and which were rejected (lightly traded) during a session.
* **What is the Value Area (VA)?**
The Value Area is the heart of the profile. It represents the price range where **70%** of the session's trading volume occurred. This is considered the "fair value" zone where both buyers and sellers were in general agreement.
* **Point of Control (POC):** The single price level with the most TPOs. This was the most accepted or "fairest" price of the session and acts as a gravitational line for price.
* **Value Area High (VAH):** The upper boundary of the 70% value zone.
* **Value Area Low (VAL):** The lower boundary of the 70% value zone.
VAH and VAL are dynamic support and resistance levels. Trading outside the previous session's value area can signal the start of a new trend.
***
### ## 📈 Key Features Explained
This script automatically calculates and displays the following critical market-generated information:
* **Multi-Timeframe Market Profile**
Automatically draws Daily, Weekly, and Monthly profiles, allowing you to analyze market structure across different time horizons. The script preserves up to 20 historical sessions to provide deep market context.
* **Naked Point of Control (nPOC)**
A "Naked" POC is a Point of Control from a previous session that has **not** been revisited by price. These levels often act as powerful magnets for price, representing areas of unfinished business that the market may seek to retest. The script tracks and displays Daily, Weekly, and Monthly nPOCs until they are touched.
* **Single Prints (Imbalance Zones)**
A Single Print is a price level where only one TPO traded during the session's development. This signifies a rapid, aggressive price move and an imbalanced market. These areas, like gaps in a traditional chart, are frequently revisited as the market seeks to "fill in" these thin parts of the profile.
* **Poor Structure (Unfinished Auctions)**
A **Poor High** or **Poor Low** occurs when the top or bottom of a profile is flat, with two or more TPOs at the extreme price. This suggests that the auction in that direction was weak and inconclusive. These weak structures often signal a high probability that price will eventually break that high or low.
***
### ## 💡 How to Use This Indicator
This tool is not a signal generator but an analytical framework to improve your trading decisions.
1. **Determine Market Context:** Start by asking: Is the current price trading *inside* or *outside* the previous session's Value Area?
* **Inside VA:** The market is in a state of balance or range-bound. Look for trades between the VAH and VAL.
* **Outside VA:** The market is in a state of imbalance and may be starting a trend. Look for continuation or acceptance of prices outside the prior value.
2. **Identify Key Levels:**
* Use historical **nPOCs** as potential profit targets or areas to watch for a price reaction.
* Treat historical **VAH** and **VAL** levels as significant support and resistance zones.
* Note where **Single Prints** are. These are often price magnets that may get "filled" in the future.
3. **Spot Weakness:**
* A **Poor High** suggests weak resistance that may be easily broken.
* A **Poor Low** suggests weak support, signaling a potential for a continued move lower if broken.
***
### ## ⚙️ Customization & Crypto Presets
The indicator is highly customizable, allowing you to change colors, transparency, the number of historical sessions, and more.
To help traders get started quickly, the indicator includes **built-in layout presets** specifically calibrated for major cryptocurrencies: ** BINANCE:BTCUSDT.P , BINANCE:ETHUSDT.P , and BINANCE:SOLUSDT.P **. These presets automatically adjust key visual parameters to better suit the unique price characteristics and volatility of each asset, providing an optimized view right out of the box.
***
### ## ⚠️ Disclaimer
This indicator is a tool for market analysis and should not be interpreted as direct buy or sell signals. It provides information based on historical price action, which does not guarantee future results. Trading involves significant risk, and you should always use proper risk management. This script is designed for use on standard chart types (e.g., Candlesticks, Bar) and may produce misleading information on non-standard charts.