Time and SalesThis scrip mimics time and sales window displaying tick by tick data coming from the exchange.
It only works when the market is open. And it does not store historical data.
Red color when the last price was higher than the new price.
Gray when both were same.
Green when new price is higher than last price.
Please note that I have tested this in India NSE Market Only. If you find anything buggy let me know in the comments, I will try to update it.
Recherche dans les scripts pour "文华财经tick价格"
Monthly MA Close Generates buy or sell signal if monthly candle closes above or below the signal MA.
Long positions only.
Inputs:
-Change timeframe MA
-Change period MA
-Use SMA or EMA
-Display MA
-Use another ticker as signal
-Select time period for backtesting
This script is not necessarily written to maximize profits, but to minimize losses.
Although it can outperform 'Buy & Hold' on some occasions when there is a multiple month bearisch trend.
You can optimise this strategy by changing the signal MA inputs.
I would suggest aiming for the best Profit Factor starting from the monthly ("M") setting.
You can always fine-tune the results at a lower timeframe.
The option to use another ticker for providing signals can give you a more stable and unified results.
For example using AMEX:SPY as signal with default parameters gives better results with NASDAQ:AAPL than if you would use NASDAQ:AAPL itself.
I used the anti-repainting function from PineCoders to prevent repainting.
This script is best used for multi-month trading positions & Daily or 4H setting of your chart.
NYSE TicksDisplays NYSE ticks as histogram.
Part of market internals dashboard, so make sure to check the other indicators as well.
NeoButane Bitfinex BTC Longs vs. Shorts Tickers Simplified (MtF)With optional overlay for high/low candle values and daily resolution close. Now with MtF to add customization .
Made because I'm too lazy to constantly re-add tickers and to reduce noise.
High Tick Volume Alert (Classic Style)This indicator has the classic appearance of the volume indicator for tick volume. It notifies you according to your individual settings when there is increased volume on price.
Hammer + EMA Strategy with Tick-based SL/TPWhat This Script Does:
Detects Hammer (bullish reversal) and Inverted Hammer (bearish reversal) patterns
Requires a simple trend context (using 2 bars back)
Confirms price position relative to EMA 50
Applies tick-based SL and TP
Plots buy/sell signals on chart with emoji labels
Futures Tick and Point Value TableDisplays a table in the upper right corner of the chart showing the tick and point value in USD.
Big 8 Intraday TICKAt the start of each trading day (0930 EST), this indicator calculates the intraday price difference between open and close for the eight largest market cap stocks (AAPL, AMZN, GOOGLE, META, MSFT, NFLX, NVDA, and TSLA), assigns a +/-1 for each, and then plots the cumulative change. An EMA has been added for smoothing purposes that is set to 5 but can be changed. Please note indicator is best used on lower timeframes (15 min or less) and has no applicability to time frames above 1 hour.
The thought behind this indicator is those eight major stocks drive a majority of intraday price change in indices like SPY and QQQ that are heavily weighted towards these stocks, therefore they should be a leading indicator in price change. You can often catch a move in SPY or QQQ one to two bars (on 1 min chart) ahead of the actual move because you see this indicator moving strong to one direction.
It's not perfect as there are divergences you will see when you compare historical charts, but oftentimes those divergences ultimately lead to significant price swings in the same direction as this indicator, so recommend being on watch to pull the trigger when you see those and price confirms.
You can use this indicator in a few ways:
1. Confirmation that your current trade is in the same direction as this indicator
2. Use the zero cross as a trigger for put or call entry
3. Focusing only on calls/longs if the value is above 0, or only puts/shorts if the value is below zero. Just be sure to keep an eye on reversals.
If you have recommendations on how to improve, let me know and I'll do my best to make changes.
Inflation Adjusted Performance: Ticker/M2 money supplyPlots current ticker / M2 money supply, to give an idea of 'inflation adjusted performance'.
~In the above, see the last decade of bullish equities is not nearly as impressive as it seems when adjusted to account for the FED's money printing.
~Works on all timeframes/ assets; though M2 money supply is daily data release, so not meaningful to plot this on timeframe lower than daily.
~To display on same pane; comment-out line 6 and un-comment line 7; then save, remove and re-add indicator.
~Scale on the right is meaningless; this indicator is just to show/compare the shape of the charts.
Get Ticker Name - JDThis is a small helper script that can help you in case you need to enter exact ticker names in a script.
Gr, JD.
[CLX][#01] Animation - Price Ticker (Marquee)This indicator displays a classic animated price ticker overlaid on the user’s current chart. It is possible to fully customize it or to select one of the predefined styles.
A detailed description will follow in the next few days.
Used Pinescript technics:
- varip (view/animation)
- tulip instance (config/codestructur)
- table (view/position)
By the way, for me, one of the coolest animated effects is by Duyck
We hope you enjoy it! 🎉
CRYPTOLINX - jango_blockchained 😊👍
Disclaimer:
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely.
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script.
Crypto Base TickerAn example of using str.replace_all() function to extract a crypto ticker without its pair.
It can be useful if you didn't know syminfo.basecurrency existed.
I didn't know syminfo.basecurrency exists. Lol
Average True Range Pivot(2) High and ATR tick colorsTakes original colored ATR tick code from Autarch_Capital and adds pivot (2) high. In image the green upticks are thickened to make them easier to see. Can change in settings.
HG Scalpius - ATR Up/Down Tick HighlightHG Scalpius - ATR Up/Down Tick Highlight
This indicator highlights ATR(14) upticks (green) and downticks (red) and has the below application:
- If a new trend closing high (low) is made on a downtick in ATR, decreasing volatility mode turns on
If you come across or think of any other useful scripts for the HG Scalpius system please comment below!
Links to 2 previous HG Scalpius scripts:
-
-
Happy trading!
Code:
study(title="Average True Range", shorttitle="ATR", overlay=false)
length = input(title="Length", defval=14, minval=1)
smoothing = input(title="Smoothing", defval="RMA", options= )
ma_function(source, length) =>
if smoothing == "RMA"
rma(source, length)
else
if smoothing == "SMA"
sma(source, length)
else
if smoothing == "EMA"
ema(source, length)
else
wma(source, length)
ATR = ma_function(tr(true), length)
c = ATR >= ATR ? color.lime : color.red
plot(ATR, title = "ATR", color=c, transp=0)
Volume per minimum tickThis script calculates the volume traded per minimum tick of a scrip and is an indicator that the price move is justified by volume and trader interest
Probabilistic Panel - COMPLETE VERSION📘 Probabilistic Panel — User Manual
________________________________________
INTRODUCTION
The Probabilistic Panel is an advanced TradingView indicator that merges multiple technical-analysis components to provide a probabilistic evaluation of market direction. It is composed of several sections that assess trend, volume, price zones, support and resistance, multiple timeframes, and candle distribution.
________________________________________
PANEL STRUCTURE
1. HEADER
• PROBABILISTIC PANEL: Indicator name.
• FULL VERSION: Indicates that all functionalities are enabled.
________________________________________
2. GENERAL INFORMATION
• ASSET: Displays the asset symbol being analyzed.
• LIMITS: Shows score thresholds for classifying setups (A+, B, C).
________________________________________
3. DIRECTION PROBABILITIES
• PROB: Displays probability of upward movement (upPct) and downward movement (downPct) in percentage.
o Importance: Indicates the direction with the highest probability based on weighted factors.
________________________________________
4. CONTINUATION BIAS
• BIAS: Shows the probability of continuation of the current trend (intrProbCont).
o Importance: Evaluates whether the market is likely to continue in the same direction.
________________________________________
5. MULTI-TIMEFRAME ANALYSIS (MTF)
• MTF: Shows trend direction across multiple timeframes (1D, 1H, 15M, 5M, 1M) using arrows (↑ uptrend, ↓ downtrend, → sideways).
o Importance: Helps identify convergence or divergence between timeframes.
• ALIGNED MTF: Displays the percentage of alignment between timeframes.
o Importance: Higher alignment indicates stronger trends.
________________________________________
6. VOLUME
• VOLUME: Indicates whether volume is “INCREASING”, “DECREASING”, or “STABLE.”
o Importance: Increasing volume confirms trend strength.
________________________________________
7. TECHNICAL INDICATORS
• RSI/ROC: Displays RSI (Relative Strength Index) and ROC (Rate of Change).
o Importance:
RSI > 65 → Overbought
RSI < 35 → Oversold
ROC → Momentum strength indicator
________________________________________
8. PRICE ZONE
• ZONE: Classifies current price as “PREMIUM” (above average), “DISCOUNT” (below average), or “EQUILIBRIUM.”
o Importance: Helps identify buying/selling opportunities based on mean-reversion logic.
________________________________________
9. CANDLE ANALYSIS
• AMPLITUDE: Shows current candle size in percentage and ticks.
o Importance: Candles above minimum amplitude threshold are considered trade-valid.
• FORMATION: Classifies candle as:
o HIGH INDECISION
o TOP REJECTION
o BOTTOM REJECTION
o CONVICTION
o MIXED
o Importance: Reflects market sentiment and psychology.
• WICKS: Displays upper and lower wick size in percentage.
o Importance: Longer wicks suggest rejection or indecision.
• RATIO: Ratio between total wick size and candle body.
o Importance: High ratio = indecision; low ratio = conviction.
________________________________________
10. TRENDS
• AMPLITUDE TREND: Indicates if amplitude is “INCREASING,” “DECREASING,” or “STABLE.”
o Importance: Increasing amplitude may signal rising volatility.
• CONVICTION TREND: Indicates recent candle conviction:
o STRONG UP
o STRONG DOWN
o INDECISIVE
o MIXED
o Importance: Measures the strength of recent candles.
________________________________________
11. PROBABILITY DIFFERENCE (DIF PROB)
• Shows the percentage difference between upward and downward probabilities, classified as:
o EXCELLENT: Very favorable
o GOOD: Significant
o MEDIUM: Moderate (avoid entering)
o MARKET LOSING STRENGTH: Small difference (avoid entering)
o UNSTABLE MARKET: Very small difference (do not trade)
o Importance: Higher difference = more directional clarity.
________________________________________
12. CONFIRMATIONS
• Shows how many consecutive confirmations of the current signal were achieved relative to the configured requirement.
o Importance: More confirmations increase reliability.
________________________________________
13. SCORE & CLASSIFICATION
• SCORE: Final score from 0 to 100, calculated based on multiple factors.
o Higher scores = better setups.
• CLASSIFICATION: Setup categorized as:
o A+ SETUP
o B SETUP
o C SETUP
o DO NOT TRADE
o Importance: Defines whether conditions are favorable.
________________________________________
14. ACTION
• ACTION: Suggests “BUY,” “SELL,” or “WAIT.”
o Importance: Final actionable signal.
________________________________________
DECISION LOGIC
The indicator uses a weighted combination of multiple factors:
1. Trend (wTrend): Based on the price relative to EMA50.
2. Volume (wVol): Based on recent volume vs. its average.
3. Zone (wZona): Based on price position within recent price range.
4. Support/Resistance (wSR): Based on strength of S/R levels.
5. MTF (wMTF): Timeframe alignment.
6. Distribution (wDist): Distribution of bullish, bearish, and neutral candles.
The final score integrates:
• Probability of upward movement
• Continuation bias
• MTF conflict
• Moving-average alignment
• Volume
• Extreme RSI conditions
________________________________________
FALSE-SIGNAL FILTERS
• Close-Only Mode: Updates calculations only on candle close.
• Minimum Candle Size: Ignores very small candles.
• Consecutive Confirmations: Requires repeated signal confirmation.
• Minimum Probability Difference: Enforces a minimum separation between bullish and bearish probabilities.
________________________________________
CONCLUSION
The Probabilistic Panel is a comprehensive tool that integrates multiple technical-analysis dimensions to deliver more reliable trading signals. Parameters must be adjusted according to the asset and timeframe.
Remember: no indicator is infallible.
Always combine it with risk management and additional confirmations.
Momentum Grid 2.1 + Top Stocks📊 MOMENTUM GRID 2.1 + TOP STOCKS
Overview
A multi-timeframe confirmation system specifically designed for NIFTY 50 and BANK NIFTY index options trading. This script combines 8 independent technical indicators into a weighted scoring model to generate high-probability CE (Call) and PE (Put) signals, while simultaneously tracking the top 5 constituent stocks for sector-wide momentum validation.
________________________________________
🎯 Core Methodology
1. 8-Factor Confirmation System
Unlike traditional single-indicator approaches, this script requires multiple confirmations before generating signals. Each factor votes independently:
Trend Alignment (3 votes):
• C1: Price above/below EMA 9 (immediate trend)
• C2: EMA 9 above/below EMA 20 (short-term momentum)
• C3: EMA 20 above/below EMA 50 (intermediate trend)
Oscillator Confirmation (3 votes):
• C4: RSI above/below 50 (momentum strength)
• C5: Stochastic K above/below D (entry timing)
• C6: MACD Histogram positive/negative (momentum direction)
Advanced Momentum (2 votes):
• C7: Parabolic SAR position (trend continuation)
• C8: Squeeze Momentum direction (volatility expansion)
Mathematical Logic:
Bullish Score = C1 + C2 + C3 + C4 + C5 + C6 + C7 + C8
Signal Triggered when Score ≥ Threshold (default: 5/8)
Why This Works: By requiring 5+ confirmations, the script filters out false signals that occur when only 1-2 indicators align by chance. This dramatically reduces whipsaws in choppy markets.
________________________________________
📈 Constituent Stock Analysis System
Real-Time Top 5 Stocks Tracking
The script fetches live data from the most heavily-weighted stocks in the selected index:
NIFTY 50 Constituents:
• Reliance Industries
• HDFC Bank
• Infosys
• ICICI Bank
• TCS
BANK NIFTY Constituents:
• HDFC Bank
• ICICI Bank
• Kotak Mahindra Bank
• State Bank of India
• Axis Bank
Stock Scoring Algorithm (0-6 Scale):
For each stock, the script calculates a momentum score based on:
1. Price vs EMA 9 position
2. EMA 9 vs EMA 20 relationship
3. EMA 20 vs EMA 50 hierarchy
4. RSI above/below 50
5. MACD histogram direction
6. Intraday price change direction
Signal Interpretation:
• 🚀🔥 Strong Bullish: Score ≥5 + Day Change >0.5%
• ⚠️❄️ Strong Bearish: Score ≤1 + Day Change <-0.5%
• 📈 Moderate Bullish: Score ≥3 + Positive change
• 📉 Moderate Bearish: Score ≤3 + Negative change
Why Track Constituents?
Index options are a weighted average of their components. When 4 out of 5 top stocks show strong bullish signals but the index signal is neutral, it indicates:
• Sector rotation is happening
• Underlying strength not yet reflected in index
• Early warning for potential index breakout
________________________________________
🎨 Visual Dashboard System
1. Main Momentum Grid (Middle Right)
Real-time status of all 8 confirmation factors:
• Individual indicator values
• Bullish/Bearish status per indicator
• Cumulative Bull Score and Bear Score
• Visual color coding (Green = Bullish, Red = Bearish)
2. Top Stocks Status Panel (Top Right)
Live tracking table showing:
• LTP (Last Traded Price): Current stock price
• Day Change %: Intraday movement from open
• Status: Overall bullish/bearish trend
• EMA Status: Position relative to EMA 9
• Signal Emoji: Visual strength indicator
3. Scenario Guide (Bottom Right)
Auto-calculates trade parameters based on current signal:
• Side: CE (Call) or PE (Put) recommendation
• Strike Reference: Current index price
• Trigger Level: Entry confirmation level (high/low of signal bar)
• Risk Limit: Stop loss using 1.5x ATR
• Price Objective: Target using 2.5x ATR
ATR-Based Risk Management: Average True Range (14-period) adapts stop-loss and targets to current volatility, ensuring consistent risk-reward ratios across different market conditions.
________________________________________
🚨 Signal Generation Logic
CE (Call) Signal Triggers When:
1. Bullish Score ≥ Threshold (5/8 default)
2. Previous bar Bullish Score < Threshold
3. Confirmation candle closes above EMA 9
4. Background turns light green
PE (Put) Signal Triggers When:
1. Bearish Score ≥ Threshold (5/8 default)
2. Previous bar Bearish Score < Threshold
3. Confirmation candle closes below EMA 9
4. Background turns light red
Signal Validation: Labels appear only when a new qualifying bar completes, preventing repainting. The tooltip shows the exact score and entry price for record-keeping.
________________________________________
🔧 Customization Options
Parameter Purpose Recommendation
Index Selection Choose NIFTY 50 or BANK NIFTY Match to your trading instrument
EMA Periods Adjust trend sensitivity Default (9/20/50/100) suits 5-15 min
Signal Threshold Min confirmations required 5/8 (balanced), 6/8 (conservative)
RSI Length Momentum calculation period 14 (standard), 21 (smoother)
MACD Settings Fast/Slow/Signal periods 12/26/9 (industry standard)
________________________________________
📊 Technical Indicator Details
Exponential Moving Averages (EMA)
• Why EMA vs SMA: Exponential weighting gives more importance to recent price action, making it more responsive to trend changes in fast-moving index options.
Relative Strength Index (RSI)
• Measures momentum on 0-100 scale
• 50 level acts as bull/bear dividing line
• Used for confirmation, not overbought/oversold
Stochastic Oscillator
• Compares closing price to recent range
• K line crossing above D line = bullish momentum shift
• Sensitive to short-term reversals
MACD (Moving Average Convergence Divergence)
• Histogram shows momentum acceleration/deceleration
• Positive histogram = increasing bullish momentum
• Used as tiebreaker when other signals conflict
Parabolic SAR
• Tracks stop-and-reverse points
• Dots below price = uptrend, above = downtrend
• Adds trend-following confirmation
Squeeze Momentum
• Identifies periods of low volatility (consolidation)
• Bollinger Bands inside Keltner Channels = "squeeze"
• Positive momentum during squeeze = bullish breakout setup
________________________________________
💡 What Makes This Script Unique
1. Index-Specific Design: Unlike generic multi-timeframe indicators, this is purpose-built for NIFTY/BANKNIFTY options with constituent stock correlation analysis.
2. Multi-Layer Validation: Combines price action (EMAs), momentum (RSI/Stoch/MACD), and volatility (Squeeze) for comprehensive market assessment.
3. Smart Constituent Tracking: Automatically switches stock universe based on selected index, providing sector-level context that single-chart indicators miss.
4. Adaptive Risk Management: ATR-based stop-loss and targets adjust to market volatility automatically, unlike fixed-point systems.
5. No Repainting: All calculations use confirmed bars with lookahead=barmerge.lookahead_off parameter, ensuring historical backtesting accuracy.
________________________________________
📚 Best Practices
Timeframe Selection:
• 5 min: Scalping (high frequency, tight stops)
• 15 min: Intraday swing trades (balanced)
• 1 hour: Positional option trades (overnight holds)
Trade Execution:
1. Wait for CE/PE label to appear
2. Check Top Stocks Status - look for 3+ stocks confirming index direction
3. Verify Scenario Guide shows acceptable risk-reward (min 1:1.5)
4. Enter on next candle open or use trigger level for limit orders
5. Place stop-loss at "Risk Limit" level
6. Scale out at "Price Objective" or trail with Parabolic SAR
False Signal Filters:
• Avoid signals during first 15 minutes of market open (high volatility)
• Skip signals when Top Stocks show conflicting directions (3 bull, 2 bear)
• Increase threshold to 6/8 during major news events
• Disable trading 30 minutes before important announcements
________________________________________
⚠️ Limitations & Considerations
• Index Options Specific: Optimized for NIFTY/BANKNIFTY - may need recalibration for other instruments
• Not Suitable for Trending Markets: Works best in swing/range conditions; reduce threshold in strong trends
• Constituent Data Dependency: Relies on accurate real-time stock data; verify broker data quality
• Options Greeks Ignored: Script doesn't account for theta decay, IV changes - user must manage option selection
________________________________________
🔔 Built-In Alerts
Set alerts for:
• CE Signal Generated: Bullish score crosses threshold
• PE Signal Generated: Bearish score crosses threshold
Alert messages include ticker symbol and entry price for quick execution.
________________________________________
📈 Performance Optimization Tips
1. Score Correlation Check: If Bull Score and Bear Score are both high (6+/8), market is conflicted - wait for resolution.
2. Stock Divergence Strategy: When 4/5 stocks are bullish but index shows PE signal, it often indicates a false breakdown - counter-trend opportunity.
3. Squeeze Breakout Combo: Strongest signals occur when Squeeze changes from "ON" to "OFF" simultaneously with CE/PE trigger.
4. EMA Stacking: Maximum confidence signals have all three EMAs in proper order (9>20>50 for bull, reverse for bear).
________________________________________
🎓 Educational Context
This methodology synthesizes:
• Multi-Timeframe Analysis: EMAs represent different trend horizons
• Oscillator Convergence: Multiple momentum tools reduce false positives
• Index Arbitrage Concepts: Constituent tracking exploits pricing inefficiencies
• Adaptive Volatility: ATR-based risk scales with market conditions
The 8-factor system mirrors institutional decision frameworks where analysts require consensus across multiple models before position changes.
________________________________________
📋 Quick Reference
Bullish Setup Checklist: ✅ Bull Score ≥ 5/8
✅ Green background color
✅ 3+ top stocks showing 📈 or 🚀
✅ Price above EMA 9
✅ MACD Histogram positive
Bearish Setup Checklist: ✅ Bear Score ≥ 5/8
✅ Red background color
✅ 3+ top stocks showing 📉 or ⚠️
✅ Price below EMA 9
✅ MACD Histogram negative
________________________________________
⚖️ Disclaimer
This indicator is a decision support tool, not an automated trading system. Index options involve substantial risk and can result in total loss of premium paid. The constituent stock analysis provides context but does not guarantee index price movement. Users must:
• Understand options Greeks (delta, theta, vega)
• Use proper position sizing (max 2-3% capital per trade)
• Never trade based on signals alone without market context
• Comply with SEBI regulations and broker policies
Past performance of signals does not guarantee future results.
________________________________________
Version: Pine Script v6
Supported Indices: NIFTY 50, BANK NIFTY
Resource Usage: Moderate (Multi-security data requests)
Update Frequency: Real-time on current timeframe
________________________________________
For support or suggestions, please comment below. If this script helps your trading, please like and follow for updates! 🚀📊
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.
Strategy█ OVERVIEW
This library is a Pine Script™ programmer’s tool containing a variety of strategy-related functions to assist in calculations like profit and loss, stop losses and limits. It also includes several useful functions one can use to convert between units in ticks, price, currency or a percentage of the position's size.
█ CONCEPTS
The library contains three types of functions:
1 — Functions beginning with `percent` take either a portion of a price, or the current position's entry price and convert it to the value outlined in the function's documentation.
Example: Converting a percent of the current position entry price to ticks, or calculating a percent profit at a given level for the position.
2 — Functions beginning with `tick` convert a tick value to another form.
These are useful for calculating a price or currency value from a specified number of ticks.
3 — Functions containing `Level` are used to calculate a stop or take profit level using an offset in ticks from the current entry price.
These functions can be used to plot stop or take profit levels on the chart, or as arguments to the `limit` and `stop` parameters in strategy.exit() function calls.
Note that these calculated levels flip automatically with the position's bias.
For example, using `ticksToStopLevel()` will calculate a stop level under the entry price for a long position, and above the entry price for a short position.
There are also two functions to assist in calculating a position size using the entry's stop and a fixed risk expressed as a percentage of the current account's equity. By varying the position size this way, you ensure that entries with different stop levels risk the same proportion of equity.
█ NOTES
Example code using some of the library's functions is included at the end of the library. To see it in action, copy the library's code to a new script in the Pine Editor, and “Add to chart”.
For each trade, the code displays:
• The entry level in orange.
• The stop level in fuchsia.
• The take profit level in green.
The stop and take profit levels automatically flip sides based on whether the current position is long or short.
Labels near the last trade's levels display the percentages used to calculate them, which can be changed in the script's inputs.
We plot markers for entries and exits because strategy code in libraries does not display the usual markers for them.
Look first. Then leap.
█ FUNCTIONS
percentToTicks(percent) Converts a percentage of the average entry price to ticks.
Parameters:
percent : (series int/float) The percentage of `strategy.position_avg_price` to convert to ticks. 50 is 50% of the entry price.
Returns: (float) A value in ticks.
percentToPrice(percent) Converts a percentage of the average entry price to a price.
Parameters:
percent : (series int/float) The percentage of `strategy.position_avg_price` to convert to price. 50 is 50% of the entry price.
Returns: (float) A value in the symbol's quote currency (USD for BTCUSD).
percentToCurrency(price, percent) Converts the percentage of a price to money.
Parameters:
price : (series int/float) The symbol's price.
percent : (series int/float) The percentage of `price` to calculate.
Returns: (float) A value in the symbol's currency.
percentProfit(exitPrice) Calculates the profit (as a percentage of the position's `strategy.position_avg_price` entry price) if the trade is closed at `exitPrice`.
Parameters:
exitPrice : (series int/float) The potential price to close the position.
Returns: (float) Percentage profit for the current position if closed at the `exitPrice`.
priceToTicks(price) Converts a price to ticks.
Parameters:
price : (series int/float) Price to convert to ticks.
Returns: (float) A quantity of ticks.
ticksToPrice(price) Converts ticks to a price offset from the average entry price.
Parameters:
price : (series int/float) Ticks to convert to a price.
Returns: (float) A price level that has a distance from the entry price equal to the specified number of ticks.
ticksToCurrency(ticks) Converts ticks to money.
Parameters:
ticks : (series int/float) Number of ticks.
Returns: (float) Money amount in the symbol's currency.
ticksToStopLevel(ticks) Calculates a stop loss level using a distance in ticks from the current `strategy.position_avg_price` entry price. This value can be plotted on the chart, or used as an argument to the `stop` parameter of a `strategy.exit()` call. NOTE: The stop level automatically flips based on whether the position is long or short.
Parameters:
ticks : (series int/float) The distance in ticks from the entry price to the stop loss level.
Returns: (float) A stop loss level for the current position.
ticksToTpLevel(ticks) Calculates a take profit level using a distance in ticks from the current `strategy.position_avg_price` entry price. This value can be plotted on the chart, or used as an argument to the `limit` parameter of a `strategy.exit()` call. NOTE: The take profit level automatically flips based on whether the position is long or short.
Parameters:
ticks : (series int/float) The distance in ticks from the entry price to the take profit level.
Returns: (float) A take profit level for the current position.
calcPositionSizeByStopLossTicks(stopLossTicks, riskPercent) Calculates the position size needed to implement a given stop loss (in ticks) corresponding to `riskPercent` of equity.
Parameters:
stopLossTicks : (series int) The stop loss (in ticks) that will be used to protect the position.
riskPercent : (series int/float) The maximum risk level as a percent of current equity (`strategy.equity`).
Returns: (int) A quantity of contracts.
calcPositionSizeByStopLossPercent(stopLossPercent, riskPercent, entryPrice) Calculates the position size needed to implement a given stop loss (%) corresponding to `riskPercent` of equity.
Parameters:
stopLossPercent : (series int/float) The stop loss in percent that will be used to protect the position.
riskPercent : (series int/float) The maximum risk level as a percent of current equity (`strategy.equity`).
entryPrice : (series int/float) The entry price of the position.
Returns: (int) A quantity of contracts.
exitPercent(id, lossPercent, profitPercent, qty, qtyPercent, comment, when, alertMessage) A wrapper of the `strategy.exit()` built-in which adds the possibility to specify loss & profit in as a value in percent. NOTE: this function may work incorrectly with pyramiding turned on due to the use of `strategy.position_avg_price` in its calculations of stop loss and take profit offsets.
Parameters:
id : (series string) The order identifier of the `strategy.exit()` call.
lossPercent : (series int/float) Stop loss as a percent of the entry price.
profitPercent : (series int/float) Take profit as a percent of the entry price.
qty : (series int/float) Number of contracts/shares/lots/units to exit a trade with. The default value is `na`.
qtyPercent : (series int/float) The percent of the position's size to exit a trade with. If `qty` is `na`, the default value of `qty_percent` is 100.
comment : (series string) Optional. Additional notes on the order.
when : (series bool) Condition of the order. The order is placed if it is true.
alertMessage : (series string) An optional parameter which replaces the {{strategy.order.alert_message}} placeholder when it is used in the "Create Alert" dialog box's "Message" field.
Waindrops [Makit0]█ OVERALL
Plot waindrops (custom volume profiles) on user defined periods, for each period you get high and low, it slices each period in half to get independent vwap, volume profile and the volume traded per price at each half.
It works on intraday charts only, up to 720m (12H). It can plot balanced or unbalanced waindrops, and volume profiles up to 24H sessions.
As example you can setup unbalanced periods to get independent volume profiles for the overnight and cash sessions on the futures market, or 24H periods to get the full session volume profile of EURUSD
The purpose of this indicator is twofold:
1 — from a Chartist point of view, to have an indicator which displays the volume in a more readable way
2 — from a Pine Coder point of view, to have an example of use for two very powerful tools on Pine Script:
• the recently updated drawing limit to 500 (from 50)
• the recently ability to use drawings arrays (lines and labels)
If you are new to Pine Script and you are learning how to code, I hope you read all the code and comments on this indicator, all is designed for you,
the variables and functions names, the sometimes too big explanations, the overall structure of the code, all is intended as an example on how to code
in Pine Script a specific indicator from a very good specification in form of white paper
If you wanna learn Pine Script form scratch just start HERE
In case you have any kind of problem with Pine Script please use some of the awesome resources at our disposal: USRMAN , REFMAN , AWESOMENESS , MAGIC
█ FEATURES
Waindrops are a different way of seeing the volume and price plotted in a chart, its a volume profile indicator where you can see the volume of each price level
plotted as a vertical histogram for each half of a custom period. By default the period is 60 so it plots an independent volume profile each 30m
You can think of each waindrop as an user defined candlestick or bar with four key values:
• high of the period
• low of the period
• left vwap (volume weighted average price of the first half period)
• right vwap (volume weighted average price of the second half period)
The waindrop can have 3 different colors (configurable by the user):
• GREEN: when the right vwap is higher than the left vwap (bullish sentiment )
• RED: when the right vwap is lower than the left vwap (bearish sentiment )
• BLUE: when the right vwap is equal than the left vwap ( neutral sentiment )
KEY FEATURES
• Help menu
• Custom periods
• Central bars
• Left/Right VWAPs
• Custom central bars and vwaps: color and pixels
• Highly configurable volume histogram: execution window, ticks, pixels, color, update frequency and fine tuning the neutral meaning
• Volume labels with custom size and color
• Tracking price dot to be able to see the current price when you hide your default candlesticks or bars
█ SETTINGS
Click here or set any impar period to see the HELP INFO : show the HELP INFO, if it is activated the indicator will not plot
PERIOD SIZE (max 2880 min) : waindrop size in minutes, default 60, max 2880 to allow the first half of a 48H period as a full session volume profile
BARS : show the central and vwap bars, default true
Central bars : show the central bars, default true
VWAP bars : show the left and right vwap bars, default true
Bars pixels : width of the bars in pixels, default 2
Bars color mode : bars color behavior
• BARS : gets the color from the 'Bars color' option on the settings panel
• HISTOGRAM : gets the color from the Bearish/Bullish/Neutral Histogram color options from the settings panel
Bars color : color for the central and vwap bars, default white
HISTOGRAM show the volume histogram, default true
Execution window (x24H) : last 24H periods where the volume funcionality will be plotted, default 5
Ticks per bar (max 50) : width in ticks of each histogram bar, default 2
Updates per period : number of times the histogram will update
• ONE : update at the last bar of the period
• TWO : update at the last bar of each half period
• FOUR : slice the period in 4 quarters and updates at the last bar of each of them
• EACH BAR : updates at the close of each bar
Pixels per bar : width in pixels of each histogram bar, default 4
Neutral Treshold (ticks) : delta in ticks between left and right vwaps to identify a waindrop as neutral, default 0
Bearish Histogram color : histogram color when right vwap is lower than left vwap, default red
Bullish Histogram color : histogram color when right vwap is higher than left vwap, default green
Neutral Histogram color : histogram color when the delta between right and left vwaps is equal or lower than the Neutral treshold, default blue
VOLUME LABELS : show volume labels
Volume labels color : color for the volume labels, default white
Volume Labels size : text size for the volume labels, choose between AUTO, TINY, SMALL, NORMAL or LARGE, default TINY
TRACK PRICE : show a yellow ball tracking the last price, default true
█ LIMITS
This indicator only works on intraday charts (minutes only) up to 12H (720m), the lower chart timeframe you can use is 1m
This indicator needs price, time and volume to work, it will not work on an index (there is no volume), the execution will not be allowed
The histogram (volume profile) can be plotted on 24H sessions as limit but you can plot several 24H sessions
█ ERRORS AND PERFORMANCE
Depending on the choosed settings, the script performance will be highly affected and it will experience errors
Two of the more common errors it can throw are:
• Calculation takes too long to execute
• Loop takes too long
The indicator performance is highly related to the underlying volatility (tick wise), the script takes each candlestick or bar and for each tick in it stores the price and volume, if the ticker in your chart has thousands and thousands of ticks per bar the indicator will throw an error for sure, it can not calculate in time such amount of ticks.
What all of that means? Simply put, this will throw error on the BITCOIN pair BTCUSD (high volatility with tick size 0.01) because it has too many ticks per bar, but lucky you it will work just fine on the futures contract BTC1! (tick size 5) because it has a lot less ticks per bar
There are some options you can fine tune to boost the script performance, the more demanding option in terms of resources consumption is Updates per period , by default is maxed out so lowering this setting will improve the performance in a high way.
If you wanna know more about how to improve the script performance, read the HELP INFO accessible from the settings panel
█ HOW-TO SETUP
The basic parameters to adjust are Period size , Ticks per bar and Pixels per bar
• Period size is the main setting, defines the waindrop size, to get a better looking histogram set bigger period and smaller chart timeframe
• Ticks per bar is the tricky one, adjust it differently for each underlying (ticker) volatility wise, for some you will need a low value, for others a high one.
To get a more accurate histogram set it as lower as you can (min value is 1)
• Pixels per bar allows you to adjust the width of each histogram bar, with it you can adjust the blank space between them or allow overlaping
You must play with these three parameters until you obtain the desired histogram: smoother, sharper, etc...
These are some of the different kind of charts you can setup thru the settings:
• Balanced Waindrops (default): charts with waindrops where the two halfs are of same size.
This is the default chart, just select a period (30m, 60m, 120m, 240m, pick your poison), adjust the histogram ticks and pixels and watch
• Unbalanced Waindrops: chart with waindrops where the two halfs are of different sizes.
Do you trade futures and want to plot a waindrop with the first half for the overnight session and the second half for the cash session? you got it;
just adjust the period to 1860 for any CME ticker (like ES1! for example) adjust the histogram ticks and pixels and watch
• Full Session Volume Profile: chart with waindrops where only the first half plots.
Do you use Volume profile to analize the market? Lucky you, now you can trick this one to plot it, just try a period of 780 on SPY, 2760 on ES1!, or 2880 on EURUSD
remember to adjust the histogram ticks and pixels for each underlying
• Only Bars: charts with only central and vwap bars plotted, simply deactivate the histogram and volume labels
• Only Histogram: charts with only the histogram plotted (volume profile charts), simply deactivate the bars and volume labels
• Only Volume: charts with only the raw volume numbers plotted, simply deactivate the bars and histogram
If you wanna know more about custom full session periods for different asset classes, read the HELP INFO accessible from the settings panel
EXAMPLES
Full Session Volume Profile on MES 5m chart:
Full Session Unbalanced Waindrop on MNQ 2m chart (left side Overnight session, right side Cash Session):
The following examples will have the exact same charts but on four different tickers representing a futures contract, a forex pair, an etf and a stock.
We are doing this to be able to see the different parameters we need for plotting the same kind of chart on different assets
The chart composition is as follows:
• Left side: Volume Labels chart (period 10)
• Upper Right side: Waindrops (period 60)
• Lower Right side: Full Session Volume Profile
The first example will specify the main parameters, the rest of the charts will have only the differences
MES :
• Left: Period size: 10, Bars: uncheck, Histogram: uncheck, Execution window: 1, Ticks per bar: 2, Updates per period: EACH BAR,
Pixels per bar: 4, Volume labels: check, Track price: check
• Upper Right: Period size: 60, Bars: check, Bars color mode: HISTOGRAM, Histogram: check, Execution window: 2, Ticks per bar: 2,
Updates per period: EACH BAR, Pixels per bar: 4, Volume labels: uncheck, Track price: check
• Lower Right: Period size: 2760, Bars: uncheck, Histogram: check, Execution window: 1, Ticks per bar: 1, Updates per period: EACH BAR,
Pixels per bar: 2, Volume labels: uncheck, Track price: check
EURUSD :
• Upper Right: Ticks per bar: 10
• Lower Right: Period size: 2880, Ticks per bar: 1, Pixels per bar: 1
SPY :
• Left: Ticks per bar: 3
• Upper Right: Ticks per bar: 5, Pixels per bar: 3
• Lower Right: Period size: 780, Ticks per bar: 2, Pixels per bar: 2
AAPL :
• Left: Ticks per bar: 2
• Upper Right: Ticks per bar: 6, Pixels per bar: 3
• Lower Right: Period size: 780, Ticks per bar: 1, Pixels per bar: 2
█ THANKS TO
PineCoders for all they do, all the tools and help they provide and their involvement in making a better community
scarf for the idea of coding a waindrops like indicator, I did not know something like that existed at all
All the Pine Coders, Pine Pros and Pine Wizards, people who share their work and knowledge for the sake of it and helping others, I'm very grateful indeed
I'm learning at each step of the way from you all, thanks for this awesome community;
Opensource and shared knowledge: this is the way! (said with canned voice from inside my helmet :D)
█ NOTE
This description was formatted following THIS guidelines
═════════════════════════════════════════════════════════════════════════
I sincerely hope you enjoy reading and using this work as much as I enjoyed developing it :D
GOOD LUCK AND HAPPY TRADING!
SMT Divergences [LuxAlgo]The SMT Divergences indicator highlights SMT divergences between the chart symbol and two user-selected tickers (ES and YM by default).
A dashboard returning the SMT divergences statistics is also provided within the settings.
🔶 SETTINGS
Swing Lookback: Calculation window used to detect swing points.
Comparison Ticker: If enabled, will detect SMT divergences between the chart prices and the prices of the selected ticker.
🔹 Dashboard
Show Dashboard: Displays statistics dashboard on the chart.
Location: Location of the dashboard on the chart.
Size: Size of the displayed dashboard.
🔶 USAGE
SMT Divergences are characterized by diverging swing points between two securities.
The detection of SMT Divergences is performed by detecting swing points using the user chart prices as well as the prices of the selected external tickers. If a swing point on the chart ticker is detected at the same time on external tickers, comparison is performed.
Due to the detection requiring swing point confirmation (3 candles by default), this indicator can better be used to study price behaviors on the occurrence of an SMT divergence.
The dashboard highlights the number of SMT divergences that occurred on a swing high and swing low between the chart ticker and the selected external tickers.
The returned percentage indicates the proportion of swing highs or swing lows that led to an SMT divergence.






















