Profitable Loser Model [MMT]Profitable Loser Model
Overview
The Profitable Loser Model is a powerful PineScript v6 indicator designed to enhance your trading by visualizing key price levels, session open zones, Fibonacci retracements, and premium/discount zones. This overlay indicator provides traders with a customizable toolkit to analyze market structure across any timeframe, making it ideal for intraday and swing trading strategies.
Features
Open Zone Visualization
- Plots a box based on the open and close of the first candle in a user-defined timeframe (default: 5-minute).
- Customizable box color, projection offset, and label size (Tiny, Small, Normal, Large).
- Displays a timeframe label (e.g., "5m Open Zone") for quick reference, toggleable on/off.
Session Open Lines
- Optionally draws horizontal lines at key session opens (8:30 AM, 9:30 AM, 1:30 PM, Midnight, New York time).
- Customize line color, style (Solid, Dashed, Dotted), width, and label size for each session.
- Perfect for identifying critical intraday price levels.
Premium and Discount Zones
- Highlights premium (above midpoint) and discount (below midpoint) zones based on session high/low.
- Toggleable with customizable colors and projection offsets.
- Helps traders spot overbought/oversold areas for potential mean-reversion trades.
Fibonacci Retracement Levels
- Plots user-defined Fibonacci levels (default: 0.23, 0.35, 0.5, 0.62, 0.705, 0.79, 0.886, 1, 1.1).
- Customizable line style, width, color, and labels (showing percentage and/or price).
- Dynamically adjusts based on price movement relative to the open zone.
Take Profit (TP) and Stop Loss (SL) Levels
- Highlights TP (default: 0.23) and SL (default: 1.1) Fibonacci levels with distinct colors.
- Fully customizable to align with your risk-reward strategy.
How It Works
- Session Detection : Resets daily (or per user-defined timeframe) to capture the first candle's open, high, low, and close.
- Open Zone : Draws a box between the open and close, extended forward by the projection offset.
- Session Lines : Plots lines at specified session opens with customizable styles and labels.
- Fibonacci Retracement : Adjusts levels dynamically based on session high/low and price action.
- Premium/Discount Zones : Calculated from the session range midpoint, updated in real-time.
Settings
- Open Zone :
- Timeframe (default: 5m), Calculate Timeframe (default: Daily).
- Toggle label, adjust size, box color, and projection offset.
- Session Open Lines :
- Enable/disable lines for 8:30 AM, 9:30 AM, 1:30 PM, Midnight.
- Customize color, style, width, label size, and vertical offset.
- Premium/Discount Zones :
- Toggle visibility, set colors, and adjust projection offset.
- Fibonacci Retracement :
- Toggle visibility, set custom levels, line style, width, color, and label options.
- Adjust projection offset.
- TP/SL :
- Set TP/SL Fibonacci levels and colors.
Use Cases
- Intraday Trading : Use session open lines and open zones to trade key market hours.
- Swing Trading : Leverage Fibonacci levels for potential reversal or continuation zones.
- Risk Management : Set precise TP/SL levels based on Fibonacci retracements.
- Market Structure : Identify overbought/oversold zones with premium/discount areas.
Notes
- Optimized with `dynamic_requests = true` for efficient real-time data handling.
- Visual elements (boxes, lines, labels) are cleaned up at the start of each new session.
- Session lines use New York time (`America/New_York`) for alignment with major markets.
Educational
IU Grid Trading StrategyDESCRIPTION
The IU Grid Trading Strategy is designed to take advantage of ranging or sideways market conditions using a price-based grid system. This strategy automatically places long orders at predefined intervals below a starting grid level, creating a structured buy-the-dip approach. As price moves down, new long positions are opened at each level, and each position exits with a fixed profit target.
This is an ideal tool for traders who believe price will fluctuate between levels and eventually return to mean or higher ground. The script also includes a clean visual representation of grid levels and supports deep customization.
USER INPUTS
• Start Time – Strategy activation time to avoid historical noise
• Grid Start Level – The price level where the grid starts
• Grid Width – Distance between each grid level (in points)
• Number of Grids – Total number of grid levels below the start level
• Show Grid Levels – Option to display grid lines on the chart
LONG CONDITION
• The first long entry is triggered at the Grid Start Level
• Additional long entries are placed below the previous one, at each grid level
• Only one new long is added at a time, depending on the number of open trades
• All orders are placed as limit orders and managed dynamically
• Order comments and IDs help track positions clearly in the strategy tester
LONG EXIT
• Each long position has a fixed profit target
• The profit level is determined using:
Grid Width / Tick Size
• Once a position hits the defined profit, it is closed individually
• All open trades are actively monitored for exit triggers
WHY IT IS UNIQUE
• Supports up to 100 pyramiding trades to fully exploit grid setups
• Automatically cancels previous orders and manages each leg cleanly
• Smart time filter avoids backtesting from irrelevant historical data
• Cleanly plotted grid lines for better visual control
• High degree of customization to adapt to any instrument or timeframe
• Designed with realistic slippage, commission, and margin settings
HOW USER CAN BENEFIT FROM IT
• Ideal for range-bound markets or assets with mean-reverting behavior
• Helps accumulate positions at better prices without emotional bias
• Provides structured entries and exits with automated management
• Suitable for traders who prefer non-directional strategies
• Highly visual and educational for those learning about grid trading mechanisms
• Can be modified to support short trades or hybrid strategies
DISCLAIMER
This strategy is not financial advice, it's for educational purposes only highlighting the power of coding( pine script) in TradingView, I am not a SEBI-registered advisor. Trading and investing involve risk, and you should consult with a qualified financial advisor before making any trading decisions. I do not guarantee profits or take responsibility for any losses you may incur.
National Financial Conditions Index (NFCI)This is one of the most important macro indicators in my trading arsenal due to its reliability across different market regimes. I'm excited to share this with the TradingView community because this Federal Reserve data is not only completely free but extraordinarily useful for portfolio management and risk assessment.
**Important Disclaimers**: Be aware that some NFCI components are updated only monthly but carry significant weighting in the composite index. Additionally, the Fed occasionally revises historical NFCI data, so historical backtests should be interpreted with some caution. Nevertheless, this remains a crucial leading indicator for financial stress conditions.
---
## What is the National Financial Conditions Index?
The National Financial Conditions Index (NFCI) is a comprehensive measure of financial stress and liquidity conditions developed by the Federal Reserve Bank of Chicago. This indicator synthesizes over 100 financial market variables into a single, interpretable metric that captures the overall state of financial conditions in the United States (Brave & Butters, 2011).
**Key Principle**: When the NFCI is positive, financial conditions are tighter than average; when negative, conditions are looser than average. Values above +1.0 historically coincide with financial crises, while values below -1.0 often signal bubble-like conditions.
## Scientific Foundation & Research
The NFCI methodology is grounded in extensive academic research:
### Core Research Foundation
- **Brave, S., & Butters, R. A. (2011)**. "Monitoring financial stability: A financial conditions index approach." *Economic Perspectives*, 35(1), 22-43.
- **Hatzius, J., Hooper, P., Mishkin, F. S., Schoenholtz, K. L., & Watson, M. W. (2010)**. "Financial conditions indexes: A fresh look after the financial crisis." *US Monetary Policy Forum Report*, No. 23.
- **Kliesen, K. L., Owyang, M. T., & Vermann, E. K. (2012)**. "Disentangling diverse measures: A survey of financial stress indexes." *Federal Reserve Bank of St. Louis Review*, 94(5), 369-397.
### Methodological Validation
The NFCI employs Principal Component Analysis (PCA) to extract common factors from financial market data, following the methodology established by **English, W. B., Tsatsaronis, K., & Zoli, E. (2005)** in "Assessing the predictive power of measures of financial conditions for macroeconomic variables." The index has been validated through extensive academic research (Koop & Korobilis, 2014).
## NFCI Components Explained
This indicator provides access to all five official NFCI variants:
### 1. **Main NFCI**
The primary composite index incorporating all financial market sectors. This serves as the main signal for portfolio allocation decisions.
### 2. **Adjusted NFCI (ANFCI)**
Removes the influence of credit market disruptions to focus on non-credit financial stress. Particularly useful during banking crises when credit markets may be impaired but other financial conditions remain stable.
### 3. **Credit Sub-Index**
Isolates credit market conditions including corporate bond spreads, commercial paper rates, and bank lending standards. Important for assessing corporate financing stress.
### 4. **Leverage Sub-Index**
Measures systemic leverage through margin requirements, dealer financing, and institutional leverage metrics. Useful for identifying leverage-driven market stress.
### 5. **Risk Sub-Index**
Captures market-based risk measures including volatility, correlation, and tail risk indicators. Provides indication of risk appetite shifts.
## Practical Trading Applications
### Portfolio Allocation Framework
Based on the academic research, the NFCI can be used for portfolio positioning:
**Risk-On Positioning (NFCI declining):**
- Consider increasing equity exposure
- Reduce defensive positions
- Evaluate growth-oriented sectors
**Risk-Off Positioning (NFCI rising):**
- Consider reducing equity exposure
- Increase defensive positioning
- Favor large-cap, dividend-paying stocks
### Academic Validation
According to **Oet, M. V., Eiben, R., Bianco, T., Gramlich, D., & Ong, S. J. (2011)** in "The financial stress index: Identification of systemic risk conditions," financial conditions indices like the NFCI provide early warning capabilities for systemic risk conditions.
**Illing, M., & Liu, Y. (2006)** demonstrated in "Measuring financial stress in a developed country: An application to Canada" that composite financial stress measures can be useful for predicting economic downturns.
## Advanced Features of This Implementation
### Dynamic Background Coloring
- **Green backgrounds**: Risk-On conditions - potentially favorable for equity investment
- **Red backgrounds**: Risk-Off conditions - time for defensive positioning
- **Intensity varies**: Based on deviation from trend for nuanced risk assessment
### Professional Dashboard
Real-time analytics table showing:
- Current NFCI level and interpretation (TIGHT/LOOSE/NEUTRAL)
- Individual sub-index readings
- Change analysis
- Portfolio guidance (Risk On/Risk Off)
### Alert System
Professional-grade alerts for:
- Risk regime changes
- Extreme stress conditions (NFCI > 1.0)
- Bubble risk warnings (NFCI < -1.0)
- Major trend reversals
## Optimal Usage Guidelines
### Best Timeframes
- **Daily charts**: Recommended for intermediate-term positioning
- **Weekly charts**: Suitable for longer-term portfolio allocation
- **Intraday**: Less effective due to weekly update frequency
### Complementary Indicators
For enhanced analysis, combine NFCI signals with:
- **VIX levels**: Confirm stress readings
- **Credit spreads**: Validate credit sub-index signals
- **Moving averages**: Determine overall market trend context
- **Economic surprise indices**: Gauge fundamental backdrop
### Position Sizing Considerations
- **Extreme readings** (|NFCI| > 1.0): Consider higher conviction positioning
- **Moderate readings** (|NFCI| 0.3-1.0): Standard position sizing
- **Neutral readings** (|NFCI| < 0.3): Consider reduced conviction
## Important Limitations & Considerations
### Data Frequency Issues
**Critical Warning**: While the main NFCI updates weekly (typically Wednesdays), some underlying components update monthly. Corporate bond indices and commercial paper rates, which carry significant weight, may cause delayed reactions to current market conditions.
**Component Update Schedule:**
- **Weekly Updates**: Main NFCI composite, most equity volatility measures
- **Monthly Updates**: Corporate bond spreads, commercial paper rates
- **Quarterly Updates**: Banking sector surveys
- **Impact**: Significant portion of index weight may lag current conditions
### Historical Revisions
The Federal Reserve occasionally revises NFCI historical data as new information becomes available or methodologies are refined. This means backtesting results should be interpreted cautiously, and the indicator works best for forward-looking analysis rather than precise historical replication.
### Market Regime Dependency
The NFCI effectiveness may vary across different market regimes. During extended sideways markets or regime transitions, signals may be less reliable. Consider combining with trend-following indicators for optimal results.
**Bottom Line**: Use NFCI for medium-term portfolio positioning guidance. Trust the directional signals while remaining aware of data revision risks and update frequency limitations. This indicator is particularly valuable during periods of financial stress when reliable guidance is most needed.
---
**Data Source**: Federal Reserve Bank of Chicago
**Update Frequency**: Weekly (typically Wednesdays)
**Historical Coverage**: 1973-present
**Cost**: Free (public Fed data)
*This indicator is for educational and analytical purposes. Always conduct your own research and risk assessment before making investment decisions.*
## References
Brave, S., & Butters, R. A. (2011). Monitoring financial stability: A financial conditions index approach. *Economic Perspectives*, 35(1), 22-43.
English, W. B., Tsatsaronis, K., & Zoli, E. (2005). Assessing the predictive power of measures of financial conditions for macroeconomic variables. *BIS Papers*, 22, 228-252.
Hatzius, J., Hooper, P., Mishkin, F. S., Schoenholtz, K. L., & Watson, M. W. (2010). Financial conditions indexes: A fresh look after the financial crisis. *US Monetary Policy Forum Report*, No. 23.
Illing, M., & Liu, Y. (2006). Measuring financial stress in a developed country: An application to Canada. *Bank of Canada Working Paper*, 2006-02.
Kliesen, K. L., Owyang, M. T., & Vermann, E. K. (2012). Disentangling diverse measures: A survey of financial stress indexes. *Federal Reserve Bank of St. Louis Review*, 94(5), 369-397.
Koop, G., & Korobilis, D. (2014). A new index of financial conditions. *European Economic Review*, 71, 101-116.
Oet, M. V., Eiben, R., Bianco, T., Gramlich, D., & Ong, S. J. (2011). The financial stress index: Identification of systemic risk conditions. *Federal Reserve Bank of Cleveland Working Paper*, 11-30.
arjun & abhimanya [LuxAlgo]// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © LuxAlgo
//@version=5
indicator("arjune &abhi manya "
, overlay = true
, max_boxes_count = 500
, max_labels_count = 500
, max_lines_count = 500)
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
length = input.int(5, 'Volume Pivot Length'
, minval = 1)
bull_ext_last = input.int(3, 'Bullish OB '
, minval = 1
, inline = 'bull')
bg_bull_css = input.color(color.new(#169400, 80), ''
, inline = 'bull')
bull_css = input.color(#169400, ''
, inline = 'bull')
bull_avg_css = input.color(color.new(#9598a1, 37), ''
, inline = 'bull')
bear_ext_last = input.int(3, 'Bearish OB'
, minval = 1
, inline = 'bear')
bg_bear_css = input.color(color.new(#ff1100, 80), ''
, inline = 'bear')
bear_css = input.color(#ff1100, ''
, inline = 'bear')
bear_avg_css = input.color(color.new(#9598a1, 37), ''
, inline = 'bear')
line_style = input.string('⎯⎯⎯', 'Average Line Style'
, options = )
line_width = input.int(1, 'Average Line Width'
, minval = 1)
mitigation = input.string('Wick', 'Mitigation Methods'
, options = )
//-----------------------------------------------------------------------------}
//Functions
//-----------------------------------------------------------------------------{
//Line Style function
get_line_style(style) =>
out = switch style
'⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
//Function to get order block coordinates
get_coordinates(condition, top, btm, ob_val)=>
var ob_top = array.new_float(0)
var ob_btm = array.new_float(0)
var ob_avg = array.new_float(0)
var ob_left = array.new_int(0)
float ob = na
//Append coordinates to arrays
if condition
avg = math.avg(top, btm)
array.unshift(ob_top, top)
array.unshift(ob_btm, btm)
array.unshift(ob_avg, avg)
array.unshift(ob_left, time )
ob := ob_val
//Function to remove mitigated order blocks from coordinate arrays
remove_mitigated(ob_top, ob_btm, ob_left, ob_avg, target, bull)=>
mitigated = false
target_array = bull ? ob_btm : ob_top
for element in target_array
idx = array.indexof(target_array, element)
if (bull ? target < element : target > element)
mitigated := true
array.remove(ob_top, idx)
array.remove(ob_btm, idx)
array.remove(ob_avg, idx)
array.remove(ob_left, idx)
mitigated
//Function to set order blocks
set_order_blocks(ob_top, ob_btm, ob_left, ob_avg, ext_last, bg_css, border_css, lvl_css)=>
var ob_box = array.new_box(0)
var ob_lvl = array.new_line(0)
//Fill arrays with boxes/lines
if barstate.isfirst
for i = 0 to ext_last-1
array.unshift(ob_box, box.new(na,na,na,na
, xloc = xloc.bar_time
, extend= extend.right
, bgcolor = bg_css
, border_color = color.new(border_css, 70)))
array.unshift(ob_lvl, line.new(na,na,na,na
, xloc = xloc.bar_time
, extend = extend.right
, color = lvl_css
, style = get_line_style(line_style)
, width = line_width))
//Set order blocks
if barstate.islast
if array.size(ob_top) > 0
for i = 0 to math.min(ext_last-1, array.size(ob_top)-1)
get_box = array.get(ob_box, i)
get_lvl = array.get(ob_lvl, i)
box.set_lefttop(get_box, array.get(ob_left, i), array.get(ob_top, i))
box.set_rightbottom(get_box, array.get(ob_left, i), array.get(ob_btm, i))
line.set_xy1(get_lvl, array.get(ob_left, i), array.get(ob_avg, i))
line.set_xy2(get_lvl, array.get(ob_left, i)+1, array.get(ob_avg, i))
//-----------------------------------------------------------------------------}
//Global elements
//-----------------------------------------------------------------------------{
var os = 0
var target_bull = 0.
var target_bear = 0.
n = bar_index
upper = ta.highest(length)
lower = ta.lowest(length)
if mitigation == 'Close'
target_bull := ta.lowest(close, length)
target_bear := ta.highest(close, length)
else
target_bull := lower
target_bear := upper
os := high > upper ? 0 : low < lower ? 1 : os
phv = ta.pivothigh(volume, length, length)
//-----------------------------------------------------------------------------}
//Get bullish/bearish order blocks coordinates
//-----------------------------------------------------------------------------{
= get_coordinates(phv and os == 1, hl2 , low , low )
= get_coordinates(phv and os == 0, high , hl2 , high )
//-----------------------------------------------------------------------------}
//Remove mitigated order blocks
//-----------------------------------------------------------------------------{
mitigated_bull = remove_mitigated(bull_top
, bull_btm
, bull_left
, bull_avg
, target_bull
, true)
mitigated_bear = remove_mitigated(bear_top
, bear_btm
, bear_left
, bear_avg
, target_bear
, false)
//-----------------------------------------------------------------------------}
//Display order blocks
//-----------------------------------------------------------------------------{
//Set bullish order blocks
set_order_blocks(bull_top
, bull_btm
, bull_left
, bull_avg
, bull_ext_last
, bg_bull_css
, bull_css
, bull_avg_css)
//Set bearish order blocks
set_order_blocks(bear_top
, bear_btm
, bear_left
, bear_avg
, bear_ext_last
, bg_bear_css
, bear_css
, bear_avg_css)
//Show detected order blocks
plot(bull_ob, 'Bull OB', bull_css, 2, plot.style_linebr
, offset = -length
, display = display.none)
plot(bear_ob, 'Bear OB', bear_css, 2, plot.style_linebr
, offset = -length
, display = display.none)
//-----------------------------------------------------------------------------}
//Alerts
//-----------------------------------------------------------------------------{
alertcondition(bull_ob, 'Bullish OB Formed', 'Bullish order block detected')
alertcondition(bear_ob, 'Bearish OB Formed', 'bearish order block detected')
alertcondition(mitigated_bull, 'Bullish OB Mitigated', 'Bullish order block mitigated')
alertcondition(mitigated_bear, 'Bearish OB Mitigated', 'bearish order block mitigated')
//-----------------------------------------------------------------------------}
PC UpdatedThis indicator identifies a high-probability breakout setup using a simple but powerful 3-candle formation. It works on lower timeframes (like 5m) and is ideal for scalping or short-term intraday setups.
NY HIGH LOW BREAKNY HIGH LOW BREAK: A New York Session Breakout Strategy
The "NY HIGH LOW BREAK" indicator is a powerful TradingView script designed to identify and capitalize on breakout opportunities during the New York trading session. This strategy focuses on the initial price action of the New York market open, looking for clear breaches of the high or low established within the first 30 minutes. It's particularly suited for intraday traders who seek to capture momentum-driven moves.
Strategy Logic
The core of the "NY HIGH LOW BREAK" strategy revolves around these key components:
New York Session Opening Range Identification:
The script first identifies the opening range of the New York session. This is defined by the high and low prices established during the first 30 minutes of the New York trading session (from 7:01 AM GMT-4 to 7:31 AM GMT-4).
These crucial levels are then extended forward on the chart as horizontal lines, serving as potential support and resistance zones.
Breakout Signal Generation:
Long Signal: A buy signal is generated when the price breaks above the high of the New York opening range. Specifically, it looks for a candle whose open and close are both above the highLinePrice, and importantly, the previous candle's open was below and close was above the highLinePrice. This indicates a strong upward momentum confirming the breakout.
Short Signal: Conversely, a sell signal is generated when the price breaks below the low of the New York opening range. It looks for a candle whose open and close are both below the lowLinePrice, and the previous candle's open was above and close was below the lowLinePrice. This suggests strong downward momentum confirming the breakdown.
Supertrend Filter (Implicit/Future Enhancement):
While the supertrend and direction variables are present in the code, they are not actively used in the current signal generation logic. This suggests a potential future enhancement where the Supertrend indicator could be incorporated as a trend filter to confirm breakout directions, adding an extra layer of confluence to the signals. For example, only taking long breakouts when Supertrend indicates an uptrend, and short breakouts when Supertrend indicates a downtrend.
Second Candle Confirmation (Possible Future Enhancement):
The close_sec_candle function and openSEC, closeSEC variables indicate an attempt to capture the open and close of a "second candle" (30 minutes after the initial New York open). Currently, closeSEC is used in a specific condition for signal_way but not directly in the primary longSignal or shortSignal logic. This also suggests a potential future refinement where the price action of this second candle could be used for further confirmation or specific entry criteria.
Time-Based Filtering:
Signals are only considered valid within a specific trading window from 8:00 AM GMT-4 to 8:00 AM GMT-4 + 16 * 30 minutes (which is 480 minutes, or 8 hours) on 1-minute and 5-minute timeframes. This ensures that trades are taken during the most active and volatile periods of the New York session, avoiding late-session chop.
The script also highlights the New York session and lunch hours using background colors, providing visual context to the trading day.
Key Features
Automated New York Open Range Detection: The script automatically identifies and plots the high and low of the first 30 minutes of the New York trading session.
Clear Breakout Signals: Visually distinct "BUY" and "SELL" labels appear on the chart when a breakout occurs, making it easy to spot trading opportunities.
Timeframe Adaptability: While optimized for 1-minute and 5-minute timeframes for signal generation, the opening range lines can be displayed on various timeframes.
Customizable Risk-to-Reward (RR): The rr input allows users to define their preferred risk-to-reward ratio for potential trades, although it's not directly implemented in the current signal or trade management logic. This could be used by traders for manual trade management.
Visual Session and Lunch Highlights: The script colors the background to clearly delineate the New York trading session and the lunch break, helping traders understand the market context.
How to Use
Apply the Indicator: Add the "NY HIGH LOW BREAK" indicator to your chart on TradingView.
Select a Relevant Timeframe: For optimal signal generation, use 1-minute or 5-minute timeframes.
Observe the Opening Range: The green and red lines represent the high and low of the first 30 minutes of the New York session.
Look for Breakouts: Wait for price to decisively break above the green line (for a buy) or below the red line (for a sell).
Confirm Signals: The "BUY" or "SELL" labels will appear on the chart when the breakout conditions are met within the active trading window.
Implement Your Risk Management: Use your preferred risk management techniques, including stop-loss and take-profit levels, in conjunction with the signals generated. The rr input can guide your manual risk-to-reward calculations.
Potential Enhancements & Considerations
Supertrend Confirmation: Integrating the supertrend variable to filter signals would significantly enhance the strategy's robustness by aligning trades with the prevailing trend.
Stop-Loss and Take-Profit Automation: The rr input currently serves as a manual guide. Future versions could integrate automated stop-loss and take-profit placement based on this ratio, potentially using ATR for dynamic sizing.
Volume Confirmation: Adding a volume filter to confirm breakouts would ensure that only high-conviction moves are traded.
Backtesting and Optimization: Thorough backtesting across various assets and market conditions is crucial to determine the optimal settings and profitability of this strategy.
Session Times: The current session times are hardcoded. Making these user-definable inputs would allow for greater flexibility across different time zones and trading preferences.
The "NY HIGH LOW BREAK" is a straightforward yet effective strategy for capturing initial New York session momentum. By focusing on clear breakout levels, it aims to provide timely and actionable trading signals for intraday traders.
K_RSI_ATR_ATR%_CMO_MACD_ADXThis indicator is combination of below indicators:
RSI
ATR
ATR%
CMO
MACD
ADX
Forever Model [Pro+] (Sniper) Blueprint//@version=5
indicator("Forever Model Replica", overlay=true, dynamic_requests=true)
// Inputs
nasdaq = input.string("NASDAQ:NDX", "Nasdaq Symbol")
dow = input.string("DJ:DJI", "Dow Jones Symbol")
sp500 = input.string("SP:SPX", "S&P 500 Symbol")
fvg_min_range = input.float(0.5, "Min FVG Range (% of ATR)", minval=0.1)
bias = input.string("Neutral", "Directional Bias", options= )
session_filter = input.bool(true, "Filter by US Session (9 AM–5 PM UTC)")
start_hour = input.int(9, "Start Hour (UTC)", minval=0, maxval=23)
end_hour = input.int(17, "End Hour (UTC)", minval=0, maxval=23)
// ATR and Time Filter
atr = ta.atr(14)
in_time_window = not session_filter or (hour >= start_hour and hour <= end_hour)
// Arrays for active zones (FVGs and OBs)
var active_tops = array.new_float(0)
var active_bottoms = array.new_float(0)
var active_types = array.new_string(0)
var active_boxes = array.new_box(0)
// Pre-fetch price data for 14 bars for each timeframe
var float high_series_1h = array.new_float(14)
var float low_series_1h = array.new_float(14)
var float high_series_4h = array.new_float(14)
var float low_series_4h = array.new_float(14)
var float high_series_d = array.new_float(14)
var float low_series_d = array.new_float(14)
array.set(high_series_1h, 0, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 0, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 1, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 1, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 2, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 2, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 3, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 3, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 4, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 4, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 5, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 5, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 6, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 6, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 7, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 7, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 8, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 8, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 9, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 9, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 10, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 10, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 11, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 11, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 12, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 12, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_1h, 13, request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on))
array.set(low_series_1h, 13, request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 0, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 0, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 1, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 1, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 2, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 2, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 3, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 3, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 4, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 4, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 5, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 5, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 6, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 6, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 7, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 7, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 8, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 8, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 9, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 9, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 10, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 10, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 11, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 11, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 12, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 12, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_4h, 13, request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on))
array.set(low_series_4h, 13, request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 0, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 0, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 1, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 1, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 2, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 2, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 3, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 3, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 4, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 4, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 5, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 5, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 6, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 6, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 7, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 7, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 8, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 8, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 9, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 9, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 10, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 10, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 11, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 11, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 12, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 12, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
array.set(high_series_d, 13, request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on))
array.set(low_series_d, 13, request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on))
// Manual ATR calculation function (simplified for 14 periods)
manual_atr(high_series, low_series) =>
var float tr_sum = 0.0
for i = 0 to 13
high_prev = nz(array.get(high_series, i + 1), array.get(high_series, i))
low_prev = nz(array.get(low_series, i + 1), array.get(low_series, i))
tr = math.max(array.get(high_series, i), high_prev) - math.min(array.get(low_series, i), low_prev)
tr_sum := tr_sum + tr
tr_sum / 14 // Average True Range over 14 periods
// FVG Detection for Higher Timeframes (1H, 4H, D)
// 1H (60 minutes)
atr_1h = manual_atr(high_series_1h, low_series_1h)
low_1h = request.security(syminfo.tickerid, "60", low, lookahead=barmerge.lookahead_on)
high_1h = request.security(syminfo.tickerid, "60", high , lookahead=barmerge.lookahead_on)
close_1h = request.security(syminfo.tickerid, "60", close , lookahead=barmerge.lookahead_on)
open_1h = request.security(syminfo.tickerid, "60", open , lookahead=barmerge.lookahead_on)
low_1h_bear = request.security(syminfo.tickerid, "60", low , lookahead=barmerge.lookahead_on)
high_1h_bear = request.security(syminfo.tickerid, "60", high, lookahead=barmerge.lookahead_on)
fvg_bull_1h = low_1h > high_1h and close_1h > open_1h and (low_1h - high_1h) >= fvg_min_range * atr_1h and (low_1h - high_1h) > 0
fvg_bear_1h = high_1h_bear < low_1h_bear and close_1h < open_1h and (low_1h_bear - high_1h_bear) >= fvg_min_range * atr_1h and (low_1h_bear - high_1h_bear) > 0
new_fvg_bull_1h = fvg_bull_1h and not fvg_bull_1h
new_fvg_bear_1h = fvg_bear_1h and not fvg_bear_1h
if new_fvg_bull_1h and in_time_window and (bias == "Bullish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_1h)
array.push(active_bottoms, high_1h)
array.push(active_types, "fvg_bullish")
new_box = box.new(left=bar_index, top=low_1h, right=bar_index+10, bottom=high_1h, bgcolor=color.new(color.green, 80))
array.push(active_boxes, new_box)
if new_fvg_bear_1h and in_time_window and (bias == "Bearish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_1h_bear)
array.push(active_bottoms, high_1h_bear)
array.push(active_types, "fvg_bearish")
new_box = box.new(left=bar_index, top=low_1h_bear, right=bar_index+10, bottom=high_1h_bear, bgcolor=color.new(color.red, 80))
array.push(active_boxes, new_box)
// 4H (240 minutes)
atr_4h = manual_atr(high_series_4h, low_series_4h)
low_4h = request.security(syminfo.tickerid, "240", low, lookahead=barmerge.lookahead_on)
high_4h = request.security(syminfo.tickerid, "240", high , lookahead=barmerge.lookahead_on)
close_4h = request.security(syminfo.tickerid, "240", close , lookahead=barmerge.lookahead_on)
open_4h = request.security(syminfo.tickerid, "240", open , lookahead=barmerge.lookahead_on)
low_4h_bear = request.security(syminfo.tickerid, "240", low , lookahead=barmerge.lookahead_on)
high_4h_bear = request.security(syminfo.tickerid, "240", high, lookahead=barmerge.lookahead_on)
fvg_bull_4h = low_4h > high_4h and close_4h > open_4h and (low_4h - high_4h) >= fvg_min_range * atr_4h and (low_4h - high_4h) > 0
fvg_bear_4h = high_4h_bear < low_4h_bear and close_4h < open_4h and (low_4h_bear - high_4h_bear) >= fvg_min_range * atr_4h and (low_4h_bear - high_4h_bear) > 0
new_fvg_bull_4h = fvg_bull_4h and not fvg_bull_4h
new_fvg_bear_4h = fvg_bear_4h and not fvg_bear_4h
if new_fvg_bull_4h and in_time_window and (bias == "Bullish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_4h)
array.push(active_bottoms, high_4h)
array.push(active_types, "fvg_bullish")
new_box = box.new(left=bar_index, top=low_4h, right=bar_index+10, bottom=high_4h, bgcolor=color.new(color.green, 80))
array.push(active_boxes, new_box)
if new_fvg_bear_4h and in_time_window and (bias == "Bearish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_4h_bear)
array.push(active_bottoms, high_4h_bear)
array.push(active_types, "fvg_bearish")
new_box = box.new(left=bar_index, top=low_4h_bear, right=bar_index+10, bottom=high_4h_bear, bgcolor=color.new(color.red, 80))
array.push(active_boxes, new_box)
// Daily (D)
atr_d = manual_atr(high_series_d, low_series_d)
low_d = request.security(syminfo.tickerid, "D", low, lookahead=barmerge.lookahead_on)
high_d = request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on)
close_d = request.security(syminfo.tickerid, "D", close , lookahead=barmerge.lookahead_on)
open_d = request.security(syminfo.tickerid, "D", open , lookahead=barmerge.lookahead_on)
low_d_bear = request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on)
high_d_bear = request.security(syminfo.tickerid, "D", high, lookahead=barmerge.lookahead_on)
fvg_bull_d = low_d > high_d and close_d > open_d and (low_d - high_d) >= fvg_min_range * atr_d and (low_d - high_d) > 0
fvg_bear_d = high_d_bear < low_d_bear and close_d < open_d and (low_d_bear - high_d_bear) >= fvg_min_range * atr_d and (low_d_bear - high_d_bear) > 0
new_fvg_bull_d = fvg_bull_d and not fvg_bull_d
new_fvg_bear_d = fvg_bear_d and not fvg_bear_d
if new_fvg_bull_d and in_time_window and (bias == "Bullish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_d)
array.push(active_bottoms, high_d)
array.push(active_types, "fvg_bullish")
new_box = box.new(left=bar_index, top=low_d, right=bar_index+10, bottom=high_d, bgcolor=color.new(color.green, 80))
array.push(active_boxes, new_box)
if new_fvg_bear_d and in_time_window and (bias == "Bearish" or bias == "Neutral") and barstate.isconfirmed
array.push(active_tops, low_d_bear)
array.push(active_bottoms, high_d_bear)
array.push(active_types, "fvg_bearish")
new_box = box.new(left=bar_index, top=low_d_bear, right=bar_index+10, bottom=high_d_bear, bgcolor=color.new(color.red, 80))
array.push(active_boxes, new_box)
// FVG Detection for Current Timeframe (15M)
gap_bull_15m = low - high
gap_bear_15m = low - high
fvg_bull_15m = low > high and close > open and gap_bull_15m >= fvg_min_range * atr and gap_bull_15m > 0 and barstate.isconfirmed
fvg_bear_15m = high < low and close < open and gap_bear_15m >= fvg_min_range * atr and gap_bear_15m > 0 and barstate.isconfirmed
if fvg_bull_15m and in_time_window and (bias == "Bullish" or bias == "Neutral")
array.push(active_tops, low)
array.push(active_bottoms, high )
array.push(active_types, "fvg_bullish")
new_box = box.new(left=bar_index, top=low, right=bar_index+10, bottom=high , bgcolor=color.new(color.green, 80))
array.push(active_boxes, new_box)
if fvg_bear_15m and in_time_window and (bias == "Bearish" or bias == "Neutral")
array.push(active_tops, low )
array.push(active_bottoms, high)
array.push(active_types, "fvg_bearish")
new_box = box.new(left=bar_index, top=low , right=bar_index+10, bottom=high, bgcolor=color.new(color.red, 80))
array.push(active_boxes, new_box)
// OB Detection for Current Timeframe (15M)
htf_sweep_bull = request.security(syminfo.tickerid, "60", low < low and close > high , lookahead=barmerge.lookahead_on)
htf_sweep_bear = request.security(syminfo.tickerid, "60", high > high and close < low , lookahead=barmerge.lookahead_on)
is_bull_ob = low < low and close > open and close > high and htf_sweep_bull and barstate.isconfirmed
is_bear_ob = high > high and close < open and close < low and htf_sweep_bear and barstate.isconfirmed
if is_bull_ob and in_time_window and (bias == "Bullish" or bias == "Neutral")
array.push(active_tops, high)
array.push(active_bottoms, low)
array.push(active_types, "ob_bullish")
new_box = box.new(left=bar_index, top=high, right=bar_index+10, bottom=low, bgcolor=color.new(color.blue, 80))
array.push(active_boxes, new_box)
if is_bear_ob and in_time_window and (bias == "Bearish" or bias == "Neutral")
array.push(active_tops, high)
array.push(active_bottoms, low)
array.push(active_types, "ob_bearish")
new_box = box.new(left=bar_index, top=high, right=bar_index+10, bottom=low, bgcolor=color.new(color.orange, 80))
array.push(active_boxes, new_box)
// SMT Divergence Detection
nasdaq_l = request.security(nasdaq, "15", low, lookahead=barmerge.lookahead_on)
nasdaq_h = request.security(nasdaq, "15", high, lookahead=barmerge.lookahead_on)
dow_l = request.security(dow, "15", low, lookahead=barmerge.lookahead_on)
dow_h = request.security(dow, "15", high, lookahead=barmerge.lookahead_on)
sp500_l = request.security(sp500, "15", low, lookahead=barmerge.lookahead_on)
sp500_h = request.security(sp500, "15", high, lookahead=barmerge.lookahead_on)
bull_div_n = low < low and nasdaq_l > nasdaq_l
bull_div_d = low < low and dow_l > dow_l
bull_div_s = low < low and sp500_l > sp500_l
bear_div_n = high > high and nasdaq_h < nasdaq_h
bear_div_d = high > high and dow_h < dow_h
bear_div_s = high > high and sp500_h < sp500_h
div_count_bull = (bull_div_n ? 1 : 0) + (bull_div_d ? 1 : 0) + (bull_div_s ? 1 : 0)
div_count_bear = (bear_div_n ? 1 : 0) + (bear_div_d ? 1 : 0) + (bear_div_s ? 1 : 0)
smt_bull = div_count_bull >= 2 and in_time_window and (bias == "Bullish" or bias == "Neutral") and barstate.isconfirmed
smt_bear = div_count_bear >= 2 and in_time_window and (bias == "Bearish" or bias == "Neutral") and barstate.isconfirmed
plotshape(smt_bull, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(smt_bear, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
// Mitigation Logic for Active Zones
for i = array.size(active_tops) - 1 to 0
type = array.get(active_types, i)
top = array.get(active_tops, i)
bottom = array.get(active_bottoms, i)
if (type == "fvg_bullish" and close < bottom) or (type == "fvg_bearish" and close > top) or (type == "ob_bullish" and close < bottom) or (type == "ob_bearish" and close > top)
box.delete(array.get(active_boxes, i))
array.remove(active_tops, i)
array.remove(active_bottoms, i)
array.remove(active_types, i)
array.remove(active_boxes, i)
// Array Size Limit
if array.size(active_boxes) > 50
box.delete(array.get(active_boxes, 0))
array.remove(active_tops, 0)
array.remove(active_bottoms, 0)
array.remove(active_types, 0)
array.remove(active_boxes, 0)
// Alerts
alertcondition(fvg_bull_15m or fvg_bull_1h or fvg_bull_4h or fvg_bull_d, "Bullish FVG Detected", "Bullish FVG on {{ticker}}")
alertcondition(fvg_bear_15m or fvg_bear_1h or fvg_bear_4h or fvg_bear_d, "Bearish FVG Detected", "Bearish FVG on {{ticker}}")
alertcondition(is_bull_ob, "Bullish OB Detected", "Bullish OB on {{ticker}}")
alertcondition(is_bear_ob, "Bearish OB Detected", "Bearish OB on {{ticker}}")
alertcondition(smt_bull, "Bullish SMT Divergence", "Bullish SMT Divergence on {{ticker}}")
alertcondition(smt_bear, "Bearish SMT Divergence", "Bearish SMT Divergence on {{ticker}}")
Point CounterPoint counting based on current or specific bar and designated target. When multiple target are required, this makes everyone's life easier.
ShadowStats vs Official CPI YoY%This chart visualizes and compares the year-over-year (YoY) percentage change in the Consumer Price Index (CPI) as calculated by the U.S. government versus the alternative methodology used by ShadowStats, which reflects pre-1980 inflation measurement techniques. The red line represents ShadowStats' CPI YoY% estimates, while the blue line shows the official CPI YoY% reported by government sources. This side-by-side view highlights the divergence in reported inflation rates over time, particularly from the 1980s onward, offering a visual representation of how different calculation methods can lead to vastly different interpretations of inflation and purchasing power loss.
Casper sessions + fvgDraws lines for the 5 minute and 30 minute opening candle along with FVG's as per Casper's recent YouTube videos "Stupid Easy" series. There are options to toggle Asia and London ranges on and off as well as the opening candles. All lines reset at 16:30
Dynamic SL/TP Levels (ATR or Fixed %)This indicator, "Dynamic SL/TP Levels (ATR or Fixed %)", is designed to help traders visualize potential stop loss (SL) and take profit (TP) levels for both long and short positions, refreshing dynamically on each new bar. It assumes entry at the current bar's close price and uses a fixed 1:2 risk-reward ratio (TP is twice the distance of SL in the profit direction). Levels are displayed in a compact table in the chart pane for easy reference, without cluttering the main chart with lines.
Key Features:
Calculation Modes:
ATR-Based (Dynamic): SL distance is derived from the Average True Range (ATR) multiplied by a user-defined factor (default 1.5x). This adapts to the asset's volatility, providing breathing room based on recent price movements.
Fixed Percentage: SL is set as a direct percentage of the current close price (default 0.5%), offering consistent gaps regardless of volatility.
Long and Short Support: Calculates and shows SL/TP for longs (SL below close, TP above) and shorts (SL above close, TP below), with toggles to hide/show each.
Real-Time Updates: Levels recalculate every bar, making them readily available for entry decisions in your trading system.
Display: Outputs to a table in the top-right pane, showing precise values formatted to the asset's tick size (e.g., full decimal places for crypto).
How to Use:
Add the indicator to your chart via TradingView's Pine Editor or library.
Adjust settings:
Toggle "Use ATR?" on/off to switch modes.
Set "ATR Length" (default 14) and "ATR Multiplier for SL" for dynamic mode.
Set "Fixed SL %" for percentage mode.
Enable/disable "Show Long Levels" or "Show Short Levels" as needed.
Interpret the table: Use the displayed SL/TP values when your strategy signals an entry. For risk management, combine with position sizing (e.g., risk 1% of account per trade based on SL distance).
Example: On a volatile asset like BTC, ATR mode might set a wider SL for realism; on stable pairs, fixed % ensures predictability.
This tool promotes disciplined trading by tying levels to price action or fixed rules, but it's not financial advice—always backtest and use with your full strategy. Feedback welcome!
Checklist Dashboard Table# Checklist Dashboard Table – ICT/SMC Trading Helper
Overview
The “Checklist Dashboard Table” is a TradingView indicator designed to help traders structure, organize, and validate their market analyses following the ICT/SMC (Inner Circle Trader / Smart Money Concepts) methodology. It provides a visual and interactive checklist directly on your chart, ensuring you never miss a crucial step in your decision-making process.
Key Features
- Visual Checklist : All your trading criteria are displayed as color-coded checkboxes (green for validated, red for not validated), making your analysis process both clear and efficient.
- Clear Separation Between Analysis and Confirmations :
- Analysis : Reminders for your routine, such as timeframe selection (M3 to H4), trend analysis via RSI, and identification of key zones (Midnight Open, SSL/BSL, Asian High/Low).
- Confirmations : Six customizable criteria to check off as you validate your setup (clear trend, OB + FVG, OTE zone, Premium/Discount, R/R > 1:2, CBDR/Midnight).
- Personal Notes Section : Keep your trade entries, observations, or comments in a dedicated field in the indicator’s settings. Your notes are displayed right in the checklist for quick reference and journaling.
- Elegant and Compact Display : The table is styled for readability and can be positioned anywhere on your chart.
- Quick Customization : Instantly update any criterion or your personal notes via the script settings.
How to Use
1. Add the indicator to your chart.
2. Review the “Analysis” section as your pre-trade routine reminder.
3. Check off the “Confirmations” criteria as you validate your entry strategy.
4. Write your trade notes or comments in the provided notes section.
5. Use the checklist to reinforce discipline and repeatability in your trading.
Why Use This Checklist?
- Prevents you from skipping important steps in your analysis.
- Reinforces trading discipline and consistency.
- Allows you to document and review your trade decisions for ongoing improvement.
Who Is It For?
Perfect for ICT/SMC traders, but also valuable for anyone looking to organize and systematize their trading process.
Happy trading!
10 EMA, 20 EMA & 50 SMAThis script plots three key moving averages on the price chart to help identify trends and potential trade opportunities:
10 EMA (Exponential Moving Average):
A fast-reacting average that captures short-term price momentum. Useful for spotting quick trend changes.
20 EMA (Exponential Moving Average):
A medium-term average that smooths out more noise while still being responsive to price changes.
50 SMA (Simple Moving Average):
A widely-used long-term trend indicator. It smooths price data over a longer period and is often used to define overall market direction.
My strategyThe Combination 1 strategy is a precision-based breakout and retest setup designed for the EUR/USD 2-minute chart, operating during the Asia and London sessions (UTC-4). It identifies a unique consolidation zone where price, the 20-period SMA, and the 200-period SMA all align within a tight 2-pip range, signaling potential buildup. Once price breaks 10 to 15 pips above this consolidation area, the strategy waits for a retest—specifically, a wick that touches the zone, followed by a bullish close. This confirms buyer strength and triggers a BUY alert, with the take profit set at the breakout high and the stop loss at the recent swing low. This strategy filters for clean trends and disciplined breakouts, minimizing noise and maximizing precision.
Trading CalculatorTrading Calculator Indicator
VIBE CODED WITH GROK 3
The Trading Calculator is a Pine Script indicator designed to perform quick and useful trading-related calculations directly on your chart. It allows traders to execute basic arithmetic operations—such as addition, subtraction, multiplication, and division—as well as calculate percent change and average using either numerical values or trading variables (e.g., close, open, high, low, volume). The indicator displays its results in a table that resembles a calculator interface, making it both functional and visually intuitive. Unlike typical indicators, it does not overlay on the price chart but instead appears in a separate pane.
Inputs
Formula (new | old): First value or variable (e.g., 100, close, close ). Example: close uses the current closing price.
Operator: Mathematical operation (e.g., Plus, Minus, Multiply). Example: Plus adds the two inputs.
Second Input: Second value or variable (e.g., 50, open, close ). Example: open uses the current opening price.
Gaussian/Stoch-RSI Breakout Strategy🧠 Overview
The Gaussian/Stoch-RSI Breakout Strategy is a trend-following breakout strategy that combines a Gaussian Moving Average Channel with a Stochastic RSI filter. It identifies bullish breakouts when price exceeds statistically significant volatility bands and momentum confirms the move.
This strategy is best suited for trend initiation points and works across various asset classes (e.g., Forex, indices, crypto) and timeframes.
⚙️ Strategy Logic
🎯 Entry Conditions (Long Only)
A long position is triggered when both of the following conditions are met:
The closing price crosses above the upper Gaussian channel.
The Stoch RSI K line crosses above the D line (indicating bullish momentum).
❌ Exit Conditions
The long position is closed when:
The closing price falls back below the upper Gaussian channel.
🧮 Indicators & Calculations
📈 Gaussian Moving Average Channel
A Gaussian-weighted moving average is used to smooth price.
Standard deviation is computed using Gaussian weights to construct a volatility-based channel.
The channel is defined by:
Midline: Gaussian-weighted moving average
Upper Band: Midline + (Standard Deviation × Multiplier)
Lower Band: Midline − (Standard Deviation × Multiplier)
🔁 Stochastic RSI
Combines RSI with a Stochastic calculation to identify momentum shifts.
Used as a filter to confirm the strength of a breakout.
The following plots are displayed on the chart:
Gaussian Midline – Red line: core trend anchor
Upper & Lower Bands – Blue lines: breakout thresholds
Stochastic RSI is not plotted by default but used internally
🛠️ Notes & Best Practices
Timeframe: Strategy can be used on intraday or higher timeframes. For reduced noise, consider using it on 1H or higher.
No Short Trades: This version is long-only.
No Stop Loss / Take Profit: The strategy relies on a trailing exit via the Gaussian channel.
📌 Disclaimer
This strategy is intended for educational and research purposes only. Past performance does not guarantee future results. Always test strategies in a simulated environment before deploying them on a live account. This is not financial advice.
Ultimate Poker Bluff Strategy🎲 Ultimate Poker Bluff Strategy (Intraday Trading)
This strategy integrates multiple sophisticated concepts into a dynamic intraday trading system designed to identify and capitalize on short-term market inefficiencies (fake pumps and fakeouts).
The fake pump indicator can be found here:
📌 Core Concepts & Logic
This TradingView (Pine Script) strategy combines:
Poker principles:
Pot Odds: Ensures a positive risk-reward ratio (at least 2:1).
Bluff Detection: Identifies fake pumps or unnatural price movements using arbitrage detection methods relative to a benchmark (e.g., DXY).
Blackjack "Forbidden Strategy" principles:
Dynamically adjusts the position size based on the profitability of recent trades, scaling up slightly after wins and scaling down after losses.
Devil’s Game (Risk Management):
Implements strict capital protection rules by capping the maximum allowed position size, safeguarding your capital against rare and extreme market events.
⚙️ Detailed Explanation of Parameters
🎛 Strategy Inputs
Basis Risk % per Trade (baseRiskPercent): The baseline percentage of capital risked per trade (default is 1%).
TP ATR Multiplier (atrTPMultiplier = 3.0): Defines the profit target as a multiple of the ATR (Average True Range).
SL ATR Multiplier (atrSLMultiplier = 0.5): Defines the stop-loss level as a multiple of ATR. A tight SL ensures high Reward/Risk.
ATR Length (atrLength = 10): Period for ATR calculation to measure volatility.
Max Position per Trade ($) (maxAbsolutePosition): Maximum allowed position size in USD to protect from catastrophic losses (default is $100,000).
Fake Pump Scale (k) (k = 0.25): Sensitivity setting for detecting unusual price discrepancies (fake pumps).
Benchmark Asset (benchmarkTicker = "DXY"): The asset used as a reference benchmark for arbitrage detection.
📈 Indicators & Calculations
Volatility Measurement (ATR)
Uses the ATR indicator to set dynamic take-profit and stop-loss levels:
Take Profit = current price + (ATR × 3)
Stop Loss = current price − (ATR × 0.5)
Fake Pump Detection (Arbitrage Indicator)
Measures deviations from expected asset price based on a constant relation with a benchmark (e.g., DXY).
Generates EMAs (arb_ema_fast and arb_ema_slow) to detect abnormal short-term movements.
Defines upper and lower thresholds (arb_threshold) to identify potential fake pumps or unsustainable price spikes.
Gamma Stability Check
Ensures stable market conditions by confirming that the difference between fast and slow EMAs (arb_ema_fast and arb_ema_slow) remains small. Trades are entered only during stable conditions to avoid high volatility periods.
🔄 Dynamic Blackjack Position Sizing
Adjusts position sizing dynamically based on previous trade results:
Profitable last trade → Increase risk slightly (up to a cap of 3%).
Losing last trade → Reduce risk to 75% of base risk, enhancing capital protection.
🚨 Entry & Exit Logic
Long Entry Conditions:
Fast EMA crosses above Slow EMA (bullish crossover).
Market is stable (gamma_stable condition true).
Previous candle indicated a downward fake pump (isFakePumpDown ).
Short Entry Conditions:
Fast EMA crosses below Slow EMA (bearish crossover).
Market is stable (gamma_stable condition true).
Previous candle indicated an upward fake pump (isFakePumpUp ).
Risk-Reward Validation: Only enters trades when the risk-reward ratio is at least 2:1.
🛡️ Capital Protection (Devil’s Game Principle)
Ensures no single trade exceeds the absolute maximum allowable position size, providing protection against rare, catastrophic events.
🖥️ Visual Plots for Analysis
Triangles: Visual indications of detected fake pumps:
🔻 Red down arrow: Potential fake upward spike.
🔺 Green up arrow: Potential fake downward spike.
🎯 Strategy Goals & Benefits
Identifies high-probability intraday trades using a rigorous probabilistic framework inspired by professional gambling strategies.
Limits exposure effectively, scaling position size strategically to capitalize on profitable sequences and minimize the impact of losing streaks.
Ensures long-term capital growth with disciplined risk and reward management.
This is just an experiment on how to identify fake moves in the market which works especially in lower timeframe. This is not financial advice.
EMA Cross by RA4 ema indicator, shows buy sell signal on the cross of ema 1 and ema 2, ema 3 and ema 4 are optional to add, and may be of any length/period.
Contrarian Market Structure BreakMarket Structure Break application was inspired and adapted from Market Structure Oscillator indicator developed by Lux Algo. So much credit to their work.
This indicator pairs nicely with the Contrarian 100 MA and can be located here:
Indicator Description: Contrarian Market Structure BreakOverview
The "Contrarian Market Structure Break" indicator is a versatile tool tailored for traders seeking to identify potential reversal opportunities by analyzing market structure across multiple timeframes. Built on Institutional Concepts of Structure (ICT), this indicator detects Break of Structure (BOS) and Change of Character (CHoCH) patterns across short-term, intermediate-term, and long-term swings, plotting them with customizable lines and labels. It generates contrarian buy and sell signals when price breaks key swing levels, with a unique "Blue Dot Tracker" to monitor consecutive buy signals for trend confirmation. Optimized for the daily timeframe, this indicator is adaptable to other timeframes with proper testing, making it ideal for traders of forex, stocks, or cryptocurrencies.
How It Works
The indicator combines three key components to provide a comprehensive view of market dynamics: Multi-Timeframe Market Structure Analysis: It identifies swing highs and lows across short-term, intermediate-term, and long-term periods, plotting BOS (continuation) and CHoCH (reversal) events with customizable line styles and labels.
Contrarian Signal Generation: Buy and sell signals are triggered when the price crosses below swing lows (buy) or above swing highs (sell), indicating potential reversals in overextended markets.
Blue Dot Tracker: A unique feature that counts consecutive buy signals ("blue dots") and highlights a "Hold Investment" state with a yellow background when three or more buy signals occur, suggesting a potential trend continuation.
Signals are visualized as small circles below (buy) or above (sell) price bars, and a table in the bottom-right corner displays the blue dot count and recommended action (Hold or Flip Investment), enhancing decision-making clarity.
Mathematical Concepts Swing Detection: The indicator identifies swing highs and lows by comparing price patterns over three bars, ensuring robust detection of pivot points. A swing high occurs when the middle bar’s high is higher than the surrounding bars, and a swing low occurs when the middle bar’s low is lower.
Market Structure Logic: BOS is detected when the price breaks a prior swing high (bullish) or low (bearish) in the direction of the current trend, while CHoCH signals a potential reversal when the price breaks a swing level against the trend. These are calculated across three timeframes for a multi-dimensional perspective.
Blue Dot Tracker: This feature counts consecutive buy signals and tracks the entry price. If three or more buy signals occur without a sell signal, the indicator enters a "Hold Investment" state, marked by a yellow background, until the price exceeds the entry price or a sell signal occurs.
Entry and Exit Rules Buy Signal (Blue Dot Below Bar): Triggered when the closing price crosses below a swing low on either the intermediate-term or long-term timeframe, suggesting an oversold condition and potential reversal upward. Short-term signals can be enabled but are disabled by default to reduce noise.
Sell Signal (White Dot Above Bar): Triggered when the closing price crosses above a swing high on either the intermediate-term or long-term timeframe, indicating an overbought condition and potential reversal downward.
Blue Dot Tracker Logic: After a buy signal, the indicator increments a blue dot counter and records the entry price. If three or more consecutive buy signals occur (blueDotCount ≥ 3), the indicator enters a "Hold Investment" state, highlighted with a yellow background, suggesting a potential trend continuation. The "Hold Investment" state ends when the price exceeds the entry price or a sell signal occurs, resetting the counter.
Exit Rules: Traders can exit buy positions when a sell signal appears, the price exceeds the entry price during a "Hold Investment" state, or based on additional confirmation from BOS/CHoCH patterns or other technical analysis tools. Always use proper risk management.
Recommended Usage
The indicator is optimized for the daily timeframe, where it effectively captures significant reversal and continuation patterns in trending or ranging markets. It can be adapted to other timeframes (e.g., 1H, 4H, 15M) with careful testing of settings, particularly enabling/disabling short-term structure analysis to suit market conditions. Backtesting is recommended to optimize performance for your chosen asset and timeframe.
Customization Options Market Structure Display: Toggle short-term, intermediate-term, and long-term structures on or off, with customizable line styles (solid, dashed, dotted) and colors for bullish and bearish breaks.
Labels: Enable or disable BOS/CHoCH labels for each timeframe to reduce chart clutter.
Signal Visibility: Hide buy/sell signals if desired for a cleaner chart.
Blue Dot Tracker: Monitor the blue dot count and action (Hold or Flip Investment) via the table display, which is fully customizable in terms of position and appearance.
Why Use This Indicator?
The "Contrarian Market Structure Break" indicator offers a robust framework for identifying high-probability reversal and continuation setups using ICT principles. Its multi-timeframe analysis, clear signal visualization, and innovative Blue Dot Tracker provide traders with actionable insights into market dynamics. Whether you're a swing trader or a day trader, this indicator’s flexibility and intuitive design make it a valuable addition to your trading arsenal.
Note for TradingView Moderators
This script complies with TradingView's House Rules by providing an educational and transparent description without performance claims or guarantees. It is designed to assist traders in technical analysis and should be used alongside proper risk management and personal research. The code is original, well-documented, and includes customizable inputs and clear visual outputs to enhance the user experience.
Tips for Users:
Backtest thoroughly on your chosen asset and timeframe to validate signal reliability. Combine with other indicators or price action analysis for confirmation of entries and exits. Adjust timeframe settings and enable/disable short-term structures to match market volatility and your trading style.
Hope the "Contrarian Market Structure Break" indicator enhances your trading strategy and helps you navigate the markets with confidence! Happy trading!
{FREE} Candlestick Patterns [NASAlgoTrading]{FREE} Candlestick Patterns identifies and plots various candlestick patterns on price charts. It helps traders visualize potential reversal and continuation patterns in the market.
Key Features
Bullish Reversal Patterns Detected:
Hammer - Signals potential bullish reversal after a downtrend
Inverted Hammer - Indicates possible bullish reversal
Three White Soldiers - Strong bullish reversal pattern showing consecutive bullish candles
Bullish Harami - Shows potential trend reversal from bearish to bullish
Bearish Reversal Patterns Detected:
Hanging Man - Warns of potential bearish reversal after an uptrend
Shooting Star - Suggests possible bearish reversal
Three Black Crows - Strong bearish reversal pattern showing consecutive bearish candles
Bearish Harami - Indicates potential trend reversal from bullish to bearish
Dark Cloud Cover - Shows bearish reversal potential
Continuation Patterns Detected:
Rising Three Methods - Bullish continuation pattern
Falling Three Methods - Bearish continuation pattern
Gravestone Doji - Can indicate potential reversals (shown in orange)
Long-legged Doji - Shows market indecision (shown in orange)
Dragonfly Doji - Can signal potential reversals (shown in orange)
Benefits for Traders
Visual Pattern Recognition: Automatically identifies and labels patterns on the chart, saving traders time in manual analysis.
Comprehensive Coverage: Detects multiple important candlestick patterns in a single indicator.
Clear Visual Cues:
Bullish patterns marked in green below price bars
Bearish patterns marked in red above price bars
Doji patterns marked in orange
Trend Analysis: Helps identify both reversal and continuation patterns, providing insights into potential market direction.
Confirmation Tool: Can be used alongside other technical indicators to confirm trading signals.
Educational Value: Helps new traders learn to recognize important candlestick patterns.
Customization: The indicator allows for up to 50 lines to be displayed (max_lines_count = 50).
Implementation Notes
The indicator uses precise mathematical conditions to identify each pattern, including:
Relative candle body and wick sizes
Previous candle patterns and trends
Price relationships between current and historical candles
This systematic approach ensures consistent pattern recognition that might be subjective when done manually.
Futures Support & Resistance LevelsMulti-Timeframe Support & Resistance Levels for Futures Trading
Description:
This indicator automatically identifies and displays key support and resistance levels using multiple technical analysis methods. Designed specifically for futures traders (ES, NQ, etc.), it provides a clean, organized view of important price levels.
Key Features:
Multiple Detection Methods: Combines pivot points, daily ranges, and psychological levels
Smart Ranking System: Levels are numbered by strength (1 = strongest)
Clean Visualization: Extended lines across the chart with clear price labels
Confluence Detection: Highlights areas where multiple levels converge
Customizable Display: Adjust colors, line styles, and label sizes
Level Types Identified:
Daily High/Low (current session)
Previous Daily High/Low
Pivot-based Support/Resistance
Psychological Round Numbers
Confluence Zones (multiple levels clustering)
Technical Approach:
The indicator uses a strength-scoring algorithm to rank levels by importance. Daily levels receive the highest weighting (2.0), followed by previous daily levels (1.5), pivot points (1.0), and psychological levels (0.5). This helps traders focus on the most significant levels.
Visual Elements:
Solid lines = Strong levels
Dashed lines = Medium levels
Dotted lines = Weak levels
Optional technical condition markers for educational analysis
Best Used For:
Identifying key intraday levels for futures trading
Finding high-probability reversal zones
Setting logical stop-loss and take-profit levels
Recognizing confluence areas for stronger setups
Note:
This is a technical analysis tool for educational purposes. No indicator can predict future price movements. Always use proper risk management and combine with other forms of analysis.
SHMA + Cassure de Support (Long Only)SHMA Support Breakout Strategy (Long Only)
📈 Strategy based on a dynamic support breakout combined with a proprietary SHMA (Schrödinger Harmonic Moving Average) exit filter.
Entry: price crossing above a recently recognized pivot‑low support.
Exit options:
- Immediate on Stop Loss.
- On Take Profit: either exit immediately or wait for a bearish SHMA cross‑under (configurable).
This is a long‑only strategy. All logic is implemented through user‑configurable inputs: support detection (left/right bars), TP/SL levels, SHMA length and quantum alpha, and optional SHMA exit behavior.
Everything is documented and original—this script is not a simple mash‑up of standard indicators, but a unique strategy applying quantum harmonic feedback.
⚠️ Backtest only, no guarantee of future results. Use realistic commission/slippage, and risk sizing per trade (≤ 5 % of equity) are recommended.