Intraday Buy/Sell/Average Zones by Chaitu50cIntraday Buy/Sell/Average Zones by chaitu50c
 
 Timeframe: 
Tested on the 5-minute chart.
Recommended timeframe: 5-minute
 What it does 
This indicator marks intraday Buy (green) and Sell (red) zones made by strong close-confirmed breakouts. These zones act as support/resistance. If price later closes through a zone, the zone changes color from that bar forward (support ↔ resistance). It can flip more than once.
 How zones form 
Single breakout: an opposite-type candle closes beyond the previous candle’s high/low.
Double breakout: a base candle, then two opposite-type candles, and the second one closes beyond the base high/low.
 Zone size 
Buy zone: from the combo lowest low up to the nearest open/close of the combo.
Sell zone: from the combo highest high down to the nearest open/close of the combo.
 Color shift (optional) 
If price closes through a zone, it flips color at that bar and behaves as the other side (support ↔ resistance). Flips can happen again later.
 Overlap control 
When a new zone overlaps an existing same-color zone in the same session, choose:
Merge (combine), or
Suppress (ignore the new one).
Flipped zones use their current color for this.
 Right edge & session 
All zones extend to the right (your offset). Detection is limited to your chosen session, and you can show only the last N sessions.
---
 How to trade (simple) 
A) Initial breakout trade
When a new zone forms, that breakout itself can be a trade idea in the breakout direction, The stoploss will be the zone.
B) Zone breakout trade (flip)
If price later closes out of a zone and it changes color, that breakout is another trade opportunity in the new direction.
C) Retrace & average trade
When price retests a zone, wait for a confirmation candle in the zone’s favor
— bullish close for a green zone, bearish close for a red zone — then average entries inside/near the zone.
Place stops just beyond the opposite edge of the zone.
If the zone flips color, stop averaging; bias changed.
---
 Key settings 
Breakout type: Single and/or Double
Confirm on Close: strict mode (no intrabar preview) or allow intrabar preview that auto-removes if fail
Color Shift on Breaks: on/off
Same-Type Overlap: Merge/Suppress
Session, Sessions to Display, Right Offset, Colors, Max Zones
Reminder: Best results on the 5-minute timeframe (tested and recommended).
Поиск скриптов по запросу "session"
BPS Multi-MA 5 — 22/30, SMA/WMA/EMA# Multi-MA 5 — 22/30 base, SMA/WMA/EMA
**What it is**
A lightweight 5-line moving-average ribbon for fast visual bias and trend/mean-reversion reads. You can switch the MA type (SMA/WMA/EMA) and choose between two ways of setting lengths: by monthly “session-based” base (22 or 30) with multipliers, or by entering exact lengths manually. An optional info table shows the effective settings in real time.
---
## How it works
* Calculates five moving averages from the selected price source.
* Lengths are either:
  * **Multipliers mode:** `Base × Multiplier` (e.g., base 22 → 22/44/66/88/110), or
  * **Manual mode:** any five exact lengths (e.g., 10/22/50/100/200).
* Plots five lines with fixed legend titles (MA1…MA5); the **info table** displays the actual type and lengths.
---
## Inputs
**Length Mode**
* **Multipliers** — choose a **Base** of **22** (≈ trading sessions per month) or **30** (calendar-style, smoother) and set **×1…×5** multipliers.
* **Manual** — enter **Len1…Len5** directly.
**MA Settings**
* **MA Type:** SMA / WMA / EMA
* **Source:** any series (e.g., `close`, `hlc3`, etc.)
* **Use true close (ignore Heikin Ashi):** when enabled, the MA is computed from the underlying instrument’s real `close`, not HA candles.
* **Show info table:** toggles the on-chart table with the current mode, type, base, and lengths.
---
## Quick start
1. Add the indicator to your chart.
2. Pick **MA Type** (e.g., **WMA** for faster response, **SMA** for smoother).
3. Choose **Length Mode**:
   * **Multipliers:** set **Base = 22** for session-based monthly lengths (stocks/FX), or **30** for heavier smoothing.
   * **Manual:** enter your exact lengths (e.g., 10/22/50/100/200).
4. (Optional) On **Heikin Ashi** charts, enable **Use true close** if you want the lines based on the instrument’s real close.
---
## Tips & notes
* **1 month ≈ 21–22 sessions.** Using 30 as “monthly” yields a smoother, more delayed curve.
* **WMA** reacts faster than **SMA** at the same length; expect earlier signals but more whipsaws in chop.
* **Len = 1** makes the MA track the chosen source (e.g., `close`) almost exactly.
* If changing lengths doesn’t move the lines, ensure you’re editing fields for the **active Length Mode** (Multipliers vs Manual).
* For clean comparisons, use the **same timeframe**. If you later wrap this in MTF logic, keep `lookahead_off` and handle gaps appropriately.
---
## Use cases
* Trend ribbon and dynamic bias zones
* Pullback entries to the mid/slow lines
* Crossovers (fast vs slow) for confirmation
* Volatility filtering by spreading lengths (e.g., 22/44/88/132/176)
---
**Credits:** Built for clarity and speed; designed around session-based “monthly” lengths (22) or smoother calendar-style (30).
VWAP Suite {Phanchai}VWAP Suite {Phanchai}  
 Compact, readable, TradingView-friendly. 
 What is VWAP? 
The Volume Weighted Average Price (VWAP) is the average price of a period weighted by traded volume. It’s used as a fair-value reference (mean) and resets at the start of each new period.
 Included VWAP Modes 
 
 Session  — resets each trading day (current session).
 Week / Month / Quarter / Year  — current calendar periods.
 Anchored Week / Month / Quarter / Year  — starts at the beginning of the  previous  completed period.
 Rolling 7D / 30D / 90D  — rolling windows: today + last 6/29/89 daily sessions.
 
 Important 
This suite does  not  generate buy/sell signals. It provides structure and confluence; decisions remain yours.
 Use Cases 
 
 Identify fair-value zones / mean-reversion areas.
 Plan  TP  /  SL  around periodic VWAPs.
 Define  DCA levels  (e.g., anchored to prior week/month).
 Gauge trend bias via VWAP slope and reactions.
 
 How to Use 
 
 Inputs → VWAP 1..5:  Choose the period per slot (Session, Anchored, Rolling, etc.) and toggle  Show .
 Sources:  Select the price source for all VWAPs (default: HLC3).
 Global:   Line offset (bars)  shifts plots visually (does not affect calculations).
 Style tab:  Adjust per-line colors, thickness, and line style.
 
 Alerts 
 
 Price crosses a VWAP (per slot).
 VWAP slope turns  UP  or  DOWN  (per slot).
 
 Tips & Notes 
 
 Volume required:  Poor/absent volume (e.g., some FX tickers) can degrade accuracy.
 Anchored modes:  Start at the prior period’s open; values appear only after that timestamp.
 Rolling modes:  Use completed daily sessions (including today).
 Clutter control:  If labels crowd, increase  Line offset  or hide unneeded slots.
 Confluence:  Combine with market structure, liquidity zones, or momentum filters for stronger context.
 
 Built for clear VWAP workflows. Trade safe! 
MACROFLOW 200 — Bias & Triggersstephtradez model
MACROFLOW 200 — at a glance (the elevator pitch)
Trade direction = Macro Bias + 1H 200 EMA filter + DXY confirm.
Locations = 1H supply/demand zones.
Triggers (15m): (T1) Retest rejection, (T2) Liquidity sweep + BOS/CHOCH, (T3) Momentum break + shallow pullback.
Stops: structure‑based beyond zone with ATR buffer.
Targets: 2R base, scale at 1.5R, trail to next HTF zone.
Sessions: 7–10 pm ET and 9:30–10:30 am ET.
Risk: tight, prop‑friendly max 1% per session
ICT TIME ELEMENTS [KaninFX]## Overview
The ICT Time Elements indicator is a comprehensive trading tool designed to visualize the most critical market sessions and timeframes according to Inner Circle Trader (ICT) methodology. This indicator helps traders identify high-probability trading opportunities by highlighting key market sessions, killzones, and liquidity periods throughout the trading day.
## Key Features
### 🕐 Complete ICT Time Framework
- **Asian Range**: 8:00 PM - 12:00 AM (NY Time) - Evening consolidation period
- **London Killzone**: 2:00 AM - 5:00 AM (NY Time) - European market opening liquidity
- **NY Killzone**: 7:00 AM - 10:00 AM (NY Time) - US market opening with high volatility
- **Silver Bullet Sessions**: 
  - London Silver Bullet: 3:00 AM - 4:00 AM
  - AM Silver Bullet: 10:00 AM - 11:00 AM  
  - PM Silver Bullet: 2:00 PM - 3:00 PM
- **Lunch Hours**: 5:00 AM - 7:00 AM & 12:00 PM - 1:00 PM (Lower volatility periods)
- **News Embargo**: 8:30 AM - 9:30 AM (High impact news release window)
- **20-Minute Macros**: :50 to :10 minutes of each hour (Short-term reversal periods)
- **True Day Close**: 4:00 PM - 4:30 PM (Official market close)
### 🎨 Visual Customization
- **Multiple Themes**: Dark, Light, and Custom color schemes
- **Adjustable Opacity**: Control zone transparency (0-100%)
- **Font Customization**: Tiny, Small, Normal, Large text sizes
- **Custom Colors**: Personalize each zone with your preferred colors
- **Professional Display**: Clean histogram visualization with zone labels
### 🌍 Multi-Timezone Support
Built-in support for major trading centers:
- America/New_York (Default)
- America/Chicago
- America/Los_Angeles  
- Europe/London
- Asia/Tokyo
- Asia/Shanghai
- Australia/Sydney
### 📊 Smart Information Display
- **Real-time Zone Detection**: Automatically identifies current active session
- **Zone Labels**: Clear labeling at the center of each time period
- **Current Zone Indicator**: Arrow pointer showing the active session
- **Comprehensive Info Table**: Quick reference for all time zones and their schedules
- **Flexible Table Positioning**: Place info table in any corner of your chart
### ⚡ Performance Optimized
- **Memory Management**: Automatic cleanup of old labels to maintain performance
- **Efficient Processing**: Optimized time calculations for smooth operation
- **Resource Control**: Limited label generation to prevent system overload
## How It Works
The indicator continuously monitors the current time against predefined ICT session schedules. When price action enters a recognized time zone, the indicator:
1. **Highlights the Period**: Colors the histogram bar according to the active session
2. **Labels the Zone**: Places descriptive text identifying the current market condition  
3. **Updates Info Table**: Shows current session status and complete schedule
4. **Tracks Macro Periods**: Identifies 20-minute reversal windows within major sessions
### Special Features
- **Macro Detection**: Automatically identifies when current time falls within a 20-minute macro period
- **Session Overlap Handling**: Properly manages overlapping time zones with priority logic
- **Dynamic Color Adjustment**: Theme-aware color selection for optimal visibility
## Best Use Cases
### For ICT Traders
- Identify optimal entry times during killzone sessions
- Recognize silver bullet opportunities for quick scalps  
- Avoid trading during lunch hour consolidations
- Prepare for news embargo volatility
### For Session Traders
- Track major market session transitions
- Plan trading strategy around high-liquidity periods
- Understand global market flow and timing
### For Swing Traders
- Identify macro trend continuation points
- Time position entries during optimal sessions
- Understand market structure changes across sessions
## Installation & Setup
1. Add the indicator to your TradingView chart
2. Select your preferred timezone from the dropdown
3. Choose theme (Dark/Light) or customize colors
4. Adjust font size and table position to your preference
5. Enable/disable features as needed for your trading style
## Pro Tips
- **Combine with Price Action**: Use time zones alongside support/resistance levels
- **Focus on Killzones**: Highest probability setups occur during London and NY killzones
- **Watch Silver Bullets**: These 1-hour windows often provide excellent reversal opportunities  
- **Respect Lunch Hours**: Lower volatility periods - consider smaller position sizes
- **News Embargo Awareness**: Prepare for potential whipsaws during 8:30-9:30 AM
## Conclusion
The ICT Time Elements indicator transforms complex ICT timing concepts into an easy-to-read visual tool. Whether you're a beginner learning ICT methodology or an experienced trader looking to optimize your timing, this indicator provides the essential market session awareness needed for successful trading.
*Compatible with all TradingView plans and timeframes. Works best on 1-minute to 1-hour charts for optimal session visualization.*
Quarterly Cycle Theory with DST time AdjustedThe Quarterly Theory removes ambiguity, as it gives specific time-based reference points to look for when entering trades. Before being able to apply this theory to trading, one must first understand that time is fractal:
Yearly Quarters = 4 quarters of three months each.
Monthly Quarters = 4 quarters of one week each.
Weekly Quarters = 4 quarters of one day each (Monday - Thursday). Friday has its own specific function.
Daily Quarters = 4 quarters of 6 hours each = 4 trading sessions of a trading day.
Sessions Quarters =  4 quarters of 90 minutes each.
90 Minute Quarters =  4 quarters of 22.5 minutes each.
 
Yearly Cycle: Analogously to financial quarters, the year is divided in four sections of three months each:
 
Q1 - January, February, March.
Q2 - April, May, June (True Open, April Open).
Q3 - July, August, September.
Q4 - October, November, December.
 
 S&P 500 E-mini Futures (daily candles) — Monthly Cycle.
Monthly Cycle: Considering that we have four weeks in a month, we start the cycle on the first month’s Monday (regardless of the calendar Day):
 
Q1 - Week 1: first Monday of the month.
Q2 - Week 2: second Monday of the month (True Open, Daily Candle Open Price).
Q3 - Week 3: third Monday of the month.
Q4 - Week 4: fourth Monday of the month.
 
 
S&P 500 E-mini Futures (4 hour candles) — Weekly Cycle.
 
Weekly Cycle: Daye determined that although the trading week is composed by 5 trading days, we should ignore Friday, and the small portion of Sunday’s price action:
 
Q1 - Monday.
Q2 - Tuesday (True Open, Daily Candle Open Price).
Q3 - Wednesday.
Q4 - Thursday.
 
 S&P 500 E-mini Futures (1 hour candles) — Daily Cycle.
Daily Cycle: The Day can be broken down into 6 hour quarters. These times roughly define the sessions of the trading day, reinforcing the theory’s validity:
 
Q1 - 18:00 - 00:00 Asia.
Q2 - 00:00 - 06:00 London (True Open).
Q3 - 06:00 - 12:00 NY AM.
Q4 - 12:00 - 18:00 NY PM.
 
 S&P 500 E-mini Futures (15 minute candles) — 6 Hour Cycle.
6 Hour Quarters or 90 Minute Cycle / Sessions divided into four sections of 90 minutes each  (EST/EDT):
 
Asian Session
Q1 - 18:00 - 19:30
Q2 - 19:30 - 21:00 (True Open)
Q3 - 21:00 - 22:30
Q4 - 22:30 - 00:00
 London Session
Q1 - 00:00 - 01:30
Q2 - 01:30 - 03:00 (True Open)
Q3 - 03:00 - 04:30
Q4 - 04:30 - 06:00
NY AM Session 
Q1 - 06:00 - 07:30
Q2 - 07:30 - 09:00 (True Open)
Q3 - 09:00 - 10:30
Q4 - 10:30 - 12:00
NY PM Session 
Q1 - 12:00 - 13:30
Q2 - 13:30 - 15:00 (True Open)
Q3 - 15:00 - 16:30
Q4 - 16:30 - 18:00
 
 S&P 500 E-mini Futures (5 minute candles) — 90 Minute Cycle.
Micro Cycles: Dividing the 90 Minute Cycle yields 22.5 Minute Quarters, also known as Micro Sessions or Micro Quarters:
 
Asian Session
Q1/1 18:00:00 - 18:22:30
Q2     18:22:30 - 18:45:00
Q3     18:45:00 - 19:07:30
Q4     19:07:30 - 19:30:00
Q2/1 19:30:00 - 19:52:30 (True Session Open)
Q2/2 19:52:30 - 20:15:00
Q2/3 20:15:00 - 20:37:30
Q2/4 20:37:30 - 21:00:00
Q3/1 21:00:00 - 21:23:30
etc.    21:23:30 - 21:45:00
London Session
00:00:00 - 00:22:30  (True Daily Open)
00:22:30 - 00:45:00
00:45:00 - 01:07:30
01:07:30 - 01:30:00
01:30:00 - 01:52:30  (True Session Open)
01:52:30 - 02:15:00
02:15:00 - 02:37:30
02:37:30 - 03:00:00
03:00:00 - 03:22:30
03:22:30 - 03:45:00
03:45:00 - 04:07:30
04:07:30 - 04:30:00
04:30:00 - 04:52:30
04:52:30 - 05:15:00
05:15:00 - 05:37:30
05:37:30 - 06:00:00
New York AM Session
06:00:00 - 06:22:30
06:22:30 - 06:45:00
06:45:00 - 07:07:30
07:07:30 - 07:30:00
07:30:00 - 07:52:30  (True Session Open)
07:52:30 - 08:15:00
08:15:00 - 08:37:30
08:37:30 - 09:00:00
09:00:00 - 09:22:30
09:22:30 - 09:45:00
09:45:00 - 10:07:30
10:07:30 - 10:30:00
10:30:00 - 10:52:30
10:52:30 - 11:15:00
11:15:00 - 11:37:30
11:37:30 - 12:00:00
New York PM Session
12:00:00 - 12:22:30
12:22:30 - 12:45:00
12:45:00 - 13:07:30
13:07:30 - 13:30:00
13:30:00 - 13:52:30  (True Session Open)
13:52:30 - 14:15:00
14:15:00 - 14:37:30
14:37:30 - 15:00:00
15:00:00 - 15:22:30
15:22:30 - 15:45:00
15:45:00 - 15:37:30
15:37:30 - 16:00:00
16:00:00 - 16:22:30
16:22:30 - 16:45:00
16:45:00 - 17:07:30
17:07:30 - 18:00:00
 
 S&P 500 E-mini Futures (30 second candles) — 22.5 Minute Cycle.
Cz ASR indicatorAverage session range indicator built by me. Great tool to gauge volatility and intraday reversal zones. Great for FX as there is an included table that shows range in pips; however, this can be applied across all assets as a volatility measure. 
How it works:
The script measures the range of sessions, including Asia, London, and New York. The lookback period could be adjusted so you can find what length works best and is most accurate. This is then averaged out to provide the ASR. This provides us with an upper and lower bound of which the price could potentially fluctuate in based on the past session ranges. I have also added the 50% ASR, which is also a super useful metric for reversals or continuations. 
There is also a configurable UTC so that you can adjust the indicator so it can accurately measure the range within certain sessions.
Note - different session start and stop times vary from market to market. I have set the code to the standard forex market opens however, if you wish to change the time ,you are able to do so by editing the variables in the script 
Enjoy :)
 
NVOL Normalized Volume & VolatilityOVERVIEW 
Plots a normalized volume (or volatility) relative to a given bar's typical value across all charted sessions. The concept is similar to Relative Volume (RVOL) and Average True Range (ATR), but rather than using a moving average, this script uses bar data from previous sessions to more accurately separate what's normal from what's anomalous. Compatible on all timeframes and symbols.
Having volume and volatility processed within a single indicator not only allows you to toggle between the two for a consistent data display, it also allows you to measure how correlated they are. These measurements are available in the data table.
 DATA & MATH 
The core formula used to normalize each bar is:
 ( Value / Basis ) × Scale 
 Value 
The current bar's volume or volatility (see INPUTS section). When set to volume, it's exactly what you would expect (the volume of the bar). When set to volatility, it's the bar's range (high - low).
 Basis 
A statistical threshold (Mean, Median, or Q3) plus a Sigma multiple (standard deviations). The default is set to the  Mean + Sigma × 3 , which represents 99.7% of data in a normal distribution. The values are derived from the current bar's equivalent in other sessions. For example, if the current bar time is 9:30 AM, all previous 9:30 AM bars would be used to get the Mean and Sigma. Thus  Mean + Sigma × 3  would represent the  Normal Bar Vol  at 9:30 AM.
 Scale 
Depends on the Normalize setting, where it is 1 when set to Ratio, and 100 when set to Percent. This simply determines the plot's scale (ie. 0 to 1 vs. 0 to 100).
 INPUTS 
While the default configuration is recommended for a majority of use cases (see BEST PRACTICES), settings should be adjusted so most of the Normalized Plot and Linear Regression are below the Signal Zone. Only the most extreme values should exceed this area.
 Normalize 
Allows you to specify what should be normalized (Volume or Volatility) and how it should be measured (as a Ratio or Percentage). This sets the  value  and  scale  in the core formula.
 Basis 
Specifies the statistical threshold (Mean, Median, or Q3) and how many standard deviations should be added to it (Sigma). This is the  basis  in the core formula.
 Mean  is the sum of values divided by the quantity of values. It's what most people think of when they say "average."
 Median  is the middle value, where 50% of the data will be lower and 50% will be higher.
 Q3  is short for Third Quartile, where 75% of the data will be lower and 25% will be higher (think three quarters).
 Sample 
Determines the maximum sample size.
 All Charted Bars  is the default and recommended option, and ignores the adjacent lookback number.
 Lookback  is not recommended, but it is available for comparisons. It uses the adjacent lookback number and is likely to produce unreliable results outside a very specific context that is not suitable for most traders. Normalization is  not  a moving average. Unless you have a good reason to limit the sample size, do not use this option and instead use  All Charted Bars .
 Show Vol. name on plot 
Overlays "VOLUME" or "VOLATILITY" on the plot (whichever you've selected).
 Lin. Reg. 
Polynomial regressions are great for capturing non-linear patterns in data. TradingView offers a "linear regression curve", which this script uses as a substitute. If you're unfamiliar with either term, think of this like a better moving average.
You're able to specify the color, length, and multiple (how much to amplify the value). The linear regression derives its value from the normalized values.
 Norm. Val. 
This is the color of the normalized value of the current bar (see DATA & MATH section). You're able to specify the default, within signal, and beyond signal colors. As well as the plot style.
 Fade in colors between zero and the signal 
Programmatically adjust the opacity of the primary plot color based on it's normalized value. When enabled, values equal to 0 will be fully transparent, become more opaque as they move away from 0, and be fully opaque at the signal. Adjusting  opacity in this way helps make difference more obvious.
 Plot relative to bar direction 
If enabled, the normalized value will be multiplied by -1 when a bar's open is greater than the bar's close, mirroring price direction.
Technically volume and volatility are directionless. Meaning there's really no such thing as buy volume, sell volume, positive volatility, or negative volatility. There is just volume (1 buy = 1 sell = 1 volume) and volatility (high - low). Even so, visually reflecting the net effect of pricing pressure can still be useful. That's all this setting does.
 Sig. Zone 
Signal zones make identifying extremes easier. They do  not  signal if you should buy or sell, only that the current measurement is beyond what's normal. You are able to adjust the color and bounds of the zone.
 Int. Levels 
Interim levels can be useful when you want to visually bracket values into high / medium / low. These levels can have a value anywhere between 0 and 1. They will automatically be multiplied by 100 when the scale is set to Percent.
 Zero Line 
This setting allows you to specify the visibility of the zero line to best suit your trading style.
 Volume & Volatility Stats 
Displays a table of core values for both volume and volatility. Specifically the actual value, threshold (mean, median, or Q3), sigma (standard deviation), basis, normalized value, and linear regression.
 Correlation Stats 
Displays a table of correlation statistics for the current bar, as well as the data set average. Specifically the coefficient, R2, and P-Value.
 Indices & Sample Size 
Displays a table of mixed data. Specifically the current bar's index within the session, the current bar's index within the sample, and the sample size used to normalize the current bar's value.
 BEST PRACTICES 
NVOL can tell you what's normal for 9:30 AM. RVOL and ATR can only tell you if the current value is higher or lower than a moving average.
In a normal distribution (bell curve) 99.7% of data occurs within 3 standard deviations of the mean. This is why the default  basis  is set to "Mean, 3"; it includes the typical day-to-day fluctuations, better contextualizing what's actually normal, minimizing false positives.
This means a ratio value greater than 1 only occurs 0.3% of the time. A series of these values warrants your attention. Which is why the default signal zone is between 1 and 2. Ratios beyond 2 would be considered extreme with the default settings.
Inversely, ratio values less than 1 (the normal daily fluctuations) also tell a story. We should expect most values to occur around the middle 3rd, which is why interim levels default to 0.33 and 0.66, visually simplifying a given move's participation. These can be set to whatever you like and only serve as visual aids for your specific trading style.
It's worth noting that the linear regression oscillates when plotted directionally, which can help clarify short term move exhaustion and continuation.  Akin to a relative strength index (RSI), it may be used to inform a trading decision, but it should not be the only factor.
Profitability Visualization with Bid-Ask Spread ApproximationOverview 
The " Profitability Visualization with Bid-Ask Spread Approximation " indicator is designed to assist traders in assessing potential profit and loss targets in relation to the current market price or a simulated entry price. It provides flexibility by allowing users to choose between two methods for calculating the offset from the current price:
 
 Bid-Ask Spread Approximation:  The indicator attempts to estimate the bid-ask spread by using the highest (high) and lowest (low) prices within a given period (typically the current bar or a user-defined timeframe) as proxies for the ask and bid prices, respectively. This method provides a dynamic offset that adapts to market volatility.
 Percentage Offset:  Alternatively, users can specify a fixed percentage offset from the current price. This method offers a consistent offset regardless of market conditions.
 
 Key Features 
 
 Dual Offset Calculation Methods:  Choose between a dynamic bid-ask spread approximation or a fixed percentage offset to tailor the indicator to your trading style and market analysis.
 Entry Price Consideration:  The indicator can simulate an entry price at the beginning of each trading session (or the first bar on the chart if no sessions are defined). This feature enables a more realistic visualization of potential profit and loss levels based on a hypothetical entry point.
 Profit and Loss Targets:  When the entry price consideration is enabled, the indicator plots profit target (green) and loss target (red) lines. These lines represent the price levels at which a trade entered at the simulated entry price would achieve a profit or incur a loss equivalent to the calculated offset amount.
 Offset Visualization:  Regardless of whether the entry price is considered, the indicator always displays upper (aqua) and lower (fuchsia) offset lines. These lines represent the calculated offset levels based on the chosen method (bid-ask approximation or percentage offset).
 Customization:  Users can adjust the percentage offset, toggle the bid-ask approximation and entry price consideration, and customize the appearance of the lines through the indicator's settings.
 
 Inputs 
 
 useBidAskApproximation A boolean (checkbox) input that determines whether to use the bid-ask spread approximation (true) or the percentage offset (false). Default is false.
 percentageOffset A float input that allows users to specify the percentage offset to be used when useBidAskApproximation is false. The default value is 0.63.
 considerEntryPrice A boolean input that enables the consideration of a simulated entry price for calculating and displaying profit and loss targets. Default is true.
 
 Calculations 
 
 Bid-Ask Approximation (if enabled): bidApprox = request.security(syminfo.tickerid, timeframe.period, low) Approximates the bid price using the lowest price (low) of the current period. askApprox = request.security(syminfo.tickerid, timeframe.period, high) Approximates the ask price using the highest price (high) of the current period. spreadApprox = askApprox - bidApprox Calculates the approximate spread.
 Offset Amount: offsetAmount = useBidAskApproximation ? spreadApprox / 2 : close * (percentageOffset / 100) Determines the offset amount based on the selected method. If useBidAskApproximation is true, the offset is half of the approximated spread; otherwise, it's the current closing price (close) multiplied by the percentageOffset.
 Entry Price (if enabled): var entryPrice = 0.0 Initializes a variable to store the entry price. if considerEntryPrice Checks if entry price consideration is enabled. if barstate.isnew Checks if the current bar is the first bar of a new session. entryPrice := close Sets the entryPrice to the closing price of the first bar of the session.
 Profit and Loss Targets (if entry price is considered): profitTarget = entryPrice + offsetAmount Calculates the profit target price level. lossTarget = entryPrice - offsetAmount Calculates the loss target price level.
 
 Plotting 
 
 Profit Target Line:  Plotted in green (color.green) with a dashed line style (plot.style_linebr) and increased linewidth (linewidth=2) when considerEntryPrice is true.
 Loss Target Line:  Plotted in red (color.red) with a dashed line style (plot.style_linebr) and increased linewidth (linewidth=2) when considerEntryPrice is true.
 Upper Offset Line:  Always plotted in aqua (color.aqua) to show the offset level above the current price.
 Lower Offset Line:  Always plotted in fuchsia (color.fuchsia) to show the offset level below the current price.
 
 Limitations 
 
 Approximation:  The bid-ask spread approximation is based on high and low prices and may not perfectly reflect the actual bid-ask spread of a specific broker, especially during periods of high volatility or low liquidity.
 Simplified Entry:  The entry price simulation is basic and assumes entry at the beginning of each session. It does not account for specific entry signals or order types.
 No Order Execution:  This indicator is purely for visualization and does not execute any trades.
 Data Discrepancies:  The high and low values used for approximation might not always align with real-time bid and ask prices due to differences in data aggregation and timing between TradingView and various brokers.
 
 Disclaimer 
 This indicator is for educational and informational purposes only and should not be considered financial advice. Trading involves substantial risk, and past performance is not indicative of future results. Always conduct thorough research and consider your own risk tolerance before making any trading decisions. It is recommended to combine this indicator with other technical analysis tools and a well-defined trading strategy.
Opening Candle High/Low with Time Zone and Minute Offset
Title: Opening Candle High/Low with Time Zone and Minute Offset  
Description:
The Opening Candle High/Low with Time Zone and Minute Offset indicator is a versatile tool that highlights the high and low of the first candle of the trading session, adjusted for your preferred time zone and minute offset. It is particularly useful for traders who focus on opening ranges as key reference points for their trading strategies.
---
Features: 
1. Time Zone and Minute Adjustment:  
   - Allows customization of the start time by applying a time zone offset (in hours) and a minute offset.  
   - Ideal for traders operating in different time zones or trading sessions that don't align with midnight UTC.  
2. Dynamic First Candle Detection:  
   - Automatically captures the high and low of the first candle after the adjusted time.  
   - Resets daily, ensuring accurate levels for each new trading session.
3. Visual Representation:  
   - Plots the high and low levels of the first candle directly on the chart for easy reference.  
   - Uses distinct colors (green for the high and red for the low) and adjustable line widths for clarity.
4. Simplicity and Versatility:  
   - Works across all markets and timeframes, providing essential information for opening range breakout strategies, support/resistance analysis, or session-based trading.
---
How It Works:  
1. Time Adjustment:  
   - The indicator adjusts the current chart time by applying the user-defined hour and minute offsets.  
   - This ensures the "opening candle" aligns with your specific trading session requirements.  
2. First Candle Detection:  
   - When the adjusted time matches the start of a new day (midnight with offsets), the indicator captures the high and low of the first candle.  
   - These values are stored and remain static throughout the trading day.
3. Plotting:  
   - The high and low levels of the opening candle are plotted on the chart, providing visual reference points for traders.  
---
Use Case:  
- This indicator is ideal for traders who rely on the opening range of a session for planning trades, such as breakout or reversal strategies.  
- It can also serve as a key tool for identifying significant price levels in session-based trading.
Simplify your trading analysis and align your strategy with this customizable and intuitive indicator.
Enigma Endgame with Dynamic Trend-Based FibonacciThe Enigma Endgame script combines dynamic trend-based Fibonacci levels with the core principles of the ENIGMA strategy. It provides traders with actionable signals by identifying key levels of fractal support and resistance and highlighting opportunities to trade with market momentum. This tool is designed for multi-timeframe analysis and is especially effective during high-volatility sessions like London and New York.
  
  
  
  
  
Purpose and Usefulness
This script was developed to simplify complex market dynamics by integrating Fibonacci principles with ENIGMA's logic of fractal support and resistance. Traders can use it to:  
- Identify key breakout and retracement levels dynamically.  
- Understand the shift between support and resistance as price action evolves.  
- Gain confidence in their entries with real-time signals derived from logical fractal behavior.  
By merging Fibonacci levels with fractal-based trading insights, this script offers a unique and comprehensive approach to analyzing market structure.
How It Works
The script uses a dual approach to provide insights:  
1. Dynamic Fibonacci Levels:  
   - Automatically plots Fibonacci retracement and extension levels based on recent high and low swings, adjusting dynamically to current market trends.  
   - Allows traders to visualize key levels where price might reverse or extend.
2. Fractal Support and Resistance Logic:
   - The script identifies fractal support and resistance by analyzing candle formations.  
   - When a candle body closes below the low of a previous candle, the previous low, which was fractal support, now becomes fractal resistance. The script generates a bearish signal, encouraging traders to look for sell opportunities at or above the previous low.  
   - Conversely, when a candle body closes above the high of a previous candle, the previous high, which was fractal resistance, becomes fractal support. The script generates a bullish signal, encouraging traders to look for buy opportunities at or below the previous high.  
Real-Time Signals
The script marks these transitions with arrows on the chart:  
- Bearish arrows indicate broken fractal support turning into resistance.  
- Bullish arrows** indicate broken fractal resistance turning into support.  
These signals help traders stay aligned with the trend and trade with market momentum.
Key Features 
1. Session-Based Analysis: Focuses on high-probability setups by allowing traders to customize session times, such as London or US sessions.  
2. Multi-Timeframe Support: Works seamlessly across multiple timeframes for both scalpers and swing traders.  
3. Real-Time Alerts: Sends customizable alerts when price interacts with critical Fibonacci levels or fractal support/resistance shifts.  
How to Use the Script  
1. Apply the script to a clean chart for clear visualization. Avoid combining it with other scripts unless necessary.  
2. Use the arrows to identify shifts in fractal support and resistance and validate opportunities for buy/sell trades.  
3. Monitor the dynamic Fibonacci levels to find confluence with key price areas.  
4. Customize session times to focus on high-probability trading hours.  
Key Notes for Traders
- This script provides insights based on logical market structure but should be used alongside proper risk management and trading plans.  
- The fractal-based approach works well in conjunction with dynamic Fibonacci levels, helping traders build confidence in their strategy.  
- Adapt the script settings to match your unique trading style and timeframe preferences.  
By offering a seamless integration of fractal logic and Fibonacci principles, Enigma Endgame empowers traders with actionable insights to navigate markets effectively.
HT: Intraday LevelsIndicator draws several most important intraday levels: last day RTH high/low,  ETH high/low, Half Back, Day Close and current day RTH Day Open. These levels often act as support/resistance for intraday price movements. Also, they can help to assess day character and control of power.
Indicator can be used for ETH + RTH sessions.
 Important notes: 
•	User must specify RTH session time, appropriate for his time zone and exchange
•	Half-back is calculated as a middle line between RTH High and Low.
•	Day Close is always equal to close of the last bar of the previous day
•	RTH Day Open will be redrawn for the current day as soon as it is known (after RTH session opens and at least one bar gets confirmed). 
 Known issues: 
•	Day open will not be shown if there is no bar, clearly corresponding to RTH open time (e.g. if 4h timeframe is selected)
•	For some ETH sessions it is not possible to determine session’s last bar (this is pine script limitation) until next day trading starts. This means that daily levels will be also update with only then. 
 Parameters: 
 Date  – user can select date, for which levels will be plotted. Works only if “Use” check box is on. Otherwise, levels will be plotted for the last day. (“time” value doesn’t matter; unfortunately, there is no way to hide the input box) 
 RTH Open/Close time  – it is important to specify time, appropriate for your time zone. 
 Time zone  – your chart time zone (as UTC offset) 
 Visuals  – controls visibility and colors 
Script is published as an open source. It uses two libraries: Levels Lib and Functions Lib. First one demonstrates how to work with pine-script object model and arrays. You can also reuse it in your custom scripts where there is need to construct any support/resistance levels. The second library contains some useful functions for working with time and dates. 
 Disclaimer 
 This indicator should not be used as a standalone tool to make trading decisions but only in conjunction with other technical analysis methods. 
Intraday Volume Rating [Honestcowboy]The  Intraday Volume Rating  aims to provide a clearer picture of what volume is telling you on intraday charts.
 What is different to other forms of volume analysis 
While Volume averages and other measures of volume base their calculations on the previous bars on the chart (for example bars 1954 to 1968). The average volume in this indicator measures expected volume during that time of the day. 
 🔷 Why would you take this approach? 
Markets behave different during certain times of the day, also called sessions.
Here are a couple examples. 
 
 Asian Session (generally low volatility) 
 London Session (bigger volatility starts) 
 New York Session (overlap of New York with London creates huge volatility) 
 
Generally when using other types of volume averaging it does not take into account these sessions and that the market has a pattern for volume in an intraday chart.
 🔷 CALCULATION 
Think of this script like an average of volume but instead it uses past days data instead of previous bars data.
This is a chart explaining the indicator this script is based on The same principle applies but instead we measure volume at each bar of the day.
  
The script also counts the number of bars that exist in a day on your current timeframe chart. After knowing that number it creates the matrix used in it's calculations and data storage.
See how it works perfectly on a lower timeframe chart below: 
  
Getting this right was the hardest part, check the coding if you are interested in this type of stuff. I commented every step in the coding process. 
Every setting of the script is commented so no need for further explanation, enjoy!
TradingView.To Strategy Template (with Dyanmic Alerts)Hello traders,
If you're tired of manual trading and looking for a solid strategy template to pair with your indicators, look no further.
This Pine Script v5 strategy template is engineered for maximum customization and risk management.
Best part?
This Pine Script v5 template facilitates the dynamic construction of TradingView.TO alerts, sparing users the time and effort of mastering the TradingView.TO syntax and manually create alert commands.
This powerful tool gives much power to those who don't know how to code in Pinescript and want to automate their indicators' signals via TradingView.TO bot.
 IMPORTANT NOTES 
TradingView.TO is a trading bot software that forwards TradingView alerts to your brokers (examples: Binance, Oanda, Coinbase, Bybit, Metatrader 4/5, ...) for automating trading.
Many traders don't know how to create TradingView.TO dynamically-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to break options from your script and then create the orders accordingly.
This script showcases how to create TradingView.TO alerts dynamically.
 TRADINGVIEW ALERTS 
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example: 1 alert for BTC/USDT on the 5 minutes chart, 1 alert for BTC/USDT on the 15-minute chart (assuming you want your bot to trade the BTC/USDT on the 5 and 15-minute timeframes)
2) Select the Order fills and alert() function calls condition
3) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
4) TradingView.TO uses webhook technology - setting a webhook URL from the alerts notifications tab is required.
 KEY FEATURES 
 I) Modular Indicator Connection 
* plug your existing indicator into the template.
* Only two lines of code are needed for full compatibility.
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
To do so:
1) Find in your indicator where the conditions print the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator, whether a MACD , ZigZag, Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
 
//@version=5
indicator("Supertrend", overlay = true, timeframe = "", timeframe_gaps = true)
atrPeriod = input.int(10,    "ATR Length", minval = 1)
factor =    input.float(3.0, "Factor",     minval = 0.01, step = 0.01)
  = ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, display = display.none)
upTrend =    plot(direction < 0 ? supertrend : na, "Up Trend",   color = color.green, style = plot.style_linebr)
downTrend =  plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red,   style = plot.style_linebr)
fill(bodyMiddle, upTrend,   color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red,   90), fillgaps = false)
buy  = ta.crossunder(direction, 0)
sell = ta.crossunder(direction, 0)
//////// CONNECTOR SECTION //////// 
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title = "Signal", display = display.data_window)
//////// CONNECTOR SECTION //////// 
 Important Notes 
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal and -1 for the bearish signal
Now, you can connect your indicator to the Strategy Template using the method below or that one.
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings, and in the Data Source field, select your 🔌Connector🔌 (which comes from your indicator)
Note it doesn’t have to be named 🔌Connector🔌 - you can name it as you want - however, I recommend an explicit name you can easily remember.
From then, you should start seeing the signals and plenty of other stuff on your chart.
🔥 Note that whenever you update your indicator values, the strategy statistics and visuals on your chart will update in real-time
 
 II) BOT Risk Management: 
- Max Drawdown:
Mode: Select whether the max drawdown is calculated in percentage (%) or USD.
Value: If the max drawdown reaches this specified value, set a value to halt the bot.
- Max Consecutive Days:
Use Max Consecutive Days BOT Halt: Enable/Disable halting the bot if the max consecutive losing days value is reached.
- Max Consecutive Days: Set the maximum number of consecutive losing days allowed before halting the bot.
- Max Losing Streak:
Use Max Losing Streak: Enable/Disable a feature to prevent the bot from taking too many losses in a row.
- Max Losing Streak Length: Set the maximum length of a losing streak allowed.
Margin Call:
- Use Margin Call: Enable/Disable a feature to exit when a specified percentage away from a margin call to prevent it.
Margin Call (%): Set the percentage value to trigger this feature.
- Close BOT Total Loss:
Use Close BOT Total Loss: Enable/Disable a feature to close all trades and halt the bot if the total loss is reached.
- Total Loss ($): Set the total loss value in USD to trigger this feature.
Intraday BOT Risk Management:
- Intraday Losses:
Use Intraday Losses BOT Halt: Enable/Disable halting the bot on reaching specified intraday losses.
Mode: Select whether the intraday loss is calculated in percentage (%) or USD.
- Max Intraday Losses (%): Set the value for maximum intraday losses.
Limit Intraday Trades:
- Use Limit Intraday Trades: Enable/Disable a feature to limit the number of intraday trades.
- Max Intraday Trades: Set the maximum number of intraday trades allowed.
Restart Intraday EA:
 III) Order Types and Position Sizing 
- Choose between market or limit orders.
- Set your position size directly in the template.
Please use the position size from the “Inputs” and not the “Properties” tab.
I know it's redundant. - the template needs this value from the "Inputs" tab to build the alerts, and the Backtester needs it from the "Properties" tab.
 IV) Advanced Take-Profit and Stop-Loss Options 
- Choose to set your SL/TP in either USD or percentages.
- Option for multiple take-profit levels and trailing stop losses.
- Move your stop loss to break even +/- offset in USD for “risk-free” trades.
V) Miscellaneous:
Retry order openings if they fail.
Order Types:
Select and specify order type and price settings.
Position Size:
Define the type and size of positions.
Leverage:
Leverage settings, including margin type and hedge mode.
Session:
Limit trades to specific sessions.
Dates:
Limit trades to a specific date range.
Trades Direction:
Direction: Specify the market direction for opening positions.
 VI) Logger 
The TradingView.TO commands are logged in the TradingView logger.
You'll find more information about it in this  TradingView blog post .
 WHY YOU MIGHT NEED THIS TEMPLATE 
1) Transform your indicator into a TradingView.TO trading bot more easily than before
Connect your indicator to the template
Create your alerts
Set your EA settings
2) Save Time
Auto-generated alert messages for TradingView.TO.
I tested them all and checked with the support team what could/couldn’t be done.
3) Be in Control
Manage your trading risks with advanced features.
4) Customizable
Fits various trading styles and asset classes.
REQUIREMENTS
* Make sure you have your TradingView.TO account
* If there is any issue with the template, ask me in the comments section - I’ll answer quickly.
 BACKTEST RESULTS FROM THIS POST 
1) I connected this strategy template to a dummy Supertrend script.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with TradingView.TO.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
This strategy is a template to be connected to any indicator - the sky is the limit. :)
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
* Initial Capital: 100000 USD
* Position Size: 1%
* Commission Percent: 0.075%
* Slippage: 1 tick
* No margin/leverage used
ProfitView Strategy TemplateHello traders,
This script took me a full week of coding/testing, sweat, and tears - and I’m too nice as I’m giving it for free to the community.
If you're tired of manual trading and looking for a solid strategy template to pair with your indicators, look no further.
This Pine Script v5 strategy template is engineered for maximum customization and risk management.
Best part?
This Pine Script v5 template facilitates the dynamic construction of ProfitView alerts, sparing users the time and effort of mastering the ProfitView syntax and manually creating alert commands.
This powerful tool gives much power to those who don't know how to code in Pinescript and want to automate their indicators' signals via the ProfitView Chrome extension.
 IMPORTANT NOTES 
ProfitView is a trading bot software that forwards TradingView alerts to your brokers (examples: Binance, Oanda, Coinbase, Bybit, etc.) for automating trading.
Many traders don't know how to dynamically create ProfitView-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to break options from your script and then create the orders accordingly.
This script showcases how to create ProfitView alerts dynamically.
 TRADINGVIEW ALERTS 
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example: 1 alert for EUR/USD on the 5 minutes chart, 1 alert for EUR/USD on the 15-minute chart (assuming you want your bot to trade the EUR/USD on the 5 and 15-minute timeframes)
2) Select the Order fills and alert() function calls condition
3) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
4) ProfitView doesn't use webhook technology, so setting a webhook URL from the alerts notifications tab is unnecessary.
 KEY FEATURES 
 I) Modular Indicator Connection 
* plug your existing indicator into the template.
* Only two lines of code are needed for full compatibility.
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
To do so:
1) Find in your indicator where the conditions print the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator, whether a MACD , ZigZag, Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
 
//@version=5
indicator("Supertrend", overlay = true, timeframe = "", timeframe_gaps = true)
atrPeriod = input.int(10,    "ATR Length", minval = 1)
factor =    input.float(3.0, "Factor",     minval = 0.01, step = 0.01)
  = ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, display = display.none)
upTrend =    plot(direction < 0 ? supertrend : na, "Up Trend",   color = color.green, style = plot.style_linebr)
downTrend =  plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red,   style = plot.style_linebr)
fill(bodyMiddle, upTrend,   color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red,   90), fillgaps = false)
buy  = ta.crossunder(direction, 0)
sell = ta.crossunder(direction, 0)
//////// CONNECTOR SECTION //////// 
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title = "Signal", display = display.data_window)
//////// CONNECTOR SECTION //////// 
 Important Notes 
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal and -1 for the bearish signal
Now, you can connect your indicator to the Strategy Template using the method below or that one.
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings, and in the Data Source field, select your 🔌Connector🔌 (which comes from your indicator)
Note it doesn’t have to be named 🔌Connector🔌 - you can name it as you want - however, I recommend an explicit name you can easily remember.
From then, you should start seeing the signals and plenty of other stuff on your chart.
🔥 Note that whenever you update your indicator values, the strategy statistics and visuals on your chart will update in real-time
 
 II) BOT Risk Management: 
- Max Drawdown:
Mode: Select whether the max drawdown is calculated in percentage (%) or USD.
Value: If the max drawdown reaches this specified value, set a value to halt the bot.
- Max Consecutive Days:
Use Max Consecutive Days BOT Halt: Enable/Disable halting the bot if the max consecutive losing days value is reached.
- Max Consecutive Days: Set the maximum number of consecutive losing days allowed before halting the bot.
- Max Losing Streak:
Use Max Losing Streak: Enable/Disable a feature to prevent the bot from taking too many losses in a row.
- Max Losing Streak Length: Set the maximum length of a losing streak allowed.
Margin Call:
- Use Margin Call: Enable/Disable a feature to exit when a specified percentage away from a margin call to prevent it.
Margin Call (%): Set the percentage value to trigger this feature.
- Close BOT Total Loss:
Use Close BOT Total Loss: Enable/Disable a feature to close all trades and halt the bot if the total loss is reached.
- Total Loss ($): Set the total loss value in USD to trigger this feature.
Intraday BOT Risk Management:
- Intraday Losses:
Use Intraday Losses BOT Halt: Enable/Disable halting the bot on reaching specified intraday losses.
Mode: Select whether the intraday loss is calculated in percentage (%) or USD.
- Max Intraday Losses (%): Set the value for maximum intraday losses.
Limit Intraday Trades:
- Use Limit Intraday Trades: Enable/Disable a feature to limit the number of intraday trades.
- Max Intraday Trades: Set the maximum number of intraday trades allowed.
Restart Intraday EA:
- Use Restart Intraday EA: Enable/Disable a feature to restart the bot at the first bar of the next day if it has been stopped with an intraday risk management safeguard.
 III) Order Types and Position Sizing 
- Choose between market, limit, or stop orders.
- Set your position size directly in the template.
Please use the position size from the “Inputs” and not the “Properties” tab.
I know it's redundant. - the template needs this value from the "Inputs" tab to build the alerts, and the Backtester needs it from the "Properties" tab.
 IV) Advanced Take-Profit and Stop-Loss Options 
- Choose to set your SL/TP in either pips or percentages.
- Option for multiple take-profit levels and trailing stop losses.
- Move your stop loss to break even +/- offset in pips for “risk-free” trades.
 V) Miscellaneous 
Retry order openings if they fail.
Order Types:
Select and specify order type and price settings.
Position Size:
Define the type and size of positions.
Leverage:
Leverage settings, including margin type and hedge mode.
Session:
Limit trades to specific sessions.
Dates:
Limit trades to a specific date range.
Trades Direction:
Direction: Specify the market direction for opening positions.
 VI) Notifications (Telegram/Discord/Email/IFTTT/Twilio/SMS) 
Customize notifications sent to Telegram, Discord, Email, IFTTT, Twilio, and ProfitView Logger.
 VII) Logger 
The ProfitView commands are logged in the TradingView logger.
You'll find more information about it in this  TradingView blog post .
 WHY YOU MIGHT NEED THIS TEMPLATE 
1) Transform your indicator into a ProfitView trading bot more easily than before
Connect your indicator to the template
Create your alerts
Set your EA settings
2) Save Time
Auto-generated alert messages for ProfitView.
I tested them all and checked with the support team what could/couldn’t be done.
3) Be in Control
Manage your trading risks with advanced features.
4) Customizable
Fits various trading styles and asset classes.
 REQUIREMENTS 
* Make sure you have your ProfitView account and do the settings correctly in your Chrome extension. If you don't know how to do it, read the documentation + ask for help in the ProfitView Discord support channel.
* If there is any issue with the template, ask me in the comments section - I’ll answer quickly.
 BACKTEST RESULTS FROM THIS POST 
1) I connected this strategy template to a dummy Supertrend script.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with ProfitView.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
This strategy is a template to be connected to any indicator - the sky is the limit. :)
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
* Initial Capital: 100000 USD
* Position Size: 1%
* Commission Percent: 0.075%
* Slippage: 1 tick
* No margin/leverage used
Best regards,
Dave
Globex, Extended, Daily, Weekly, Monthly, Yearly Range* Adds Right Side Only Price Line & Labels for Tracking   without Extending Both Sides
* Tracks Current, Previous, and Two Previous Globex Sessions/ Futures:  
* Tracks Current, Previous, and Two Previous Extended Session/ Stocks:  
* Tracks Current, Previous, Two, & Three Previous Day Session/ Equities:  
* Tracks Current, Last, Two, Three, Four, & Five Week Session/ Equities:  
* Tracks Current, Last, Two, Three, Four, & Five Month Session/ Equities:  
* Tracks Current, Last, Two, Three, Four, & Five Year Session/ Equities:  
* Allows Custom   Range on Globex, Extended, & Daily Sessions
* Allows Custom   Range on Weekly, Monthly, & Yearly Sessions
* Lines & Labels Are Not Visible on Chart Scales
* Reversible Text & Background Color
* Lines Extend Accordingly with Range
* Labels show Price & Percent Change
* Background Colors should match   Chart Color to avoid Overlapping Text & Labels
* Lines have   Offset Extension
* Labels have   Offset Extension
* Globex Session is only visible on Futures & if Current Timeframe is Intraday
* Extended Session is only visible on Stocks & if Current Timeframe is Intraday
* Daily, Weekly, Monthly, & Yearly Sessions are visible on All Symbols & All Timeframes
* Globex, Extended, & Regular use their Default Time Sessions but allow Customization
* For Back Testing Default Sessions, switch over on the Menu to Style and Turn On/Off their Background Color; Any Area on the Chart Without Background Color is Regular Session
  
  
  
 
Short Volume StamperHello!
BE SURE TO RUN THE SCRIPT WITH BAR REPLAY TO SEE WHAT IT DOES! I hope you like it!
This script calculates the total short volume, total volume, and the short volume / total volume ratio since the 2-year high price. In addition, the approximate dollar value of all short volume since the 2-year high, and the approximate dollar value of all non-short sell volume since the 2-year high is calculated using VWAP. A red line (short interest ratio >= 20%) connects the 2-year high to current session’s high price; a green line (short interest ratio < 20%) connects the 2-year high to the current session’s high. 
The script also “stamps” sessions in which a NEW 1-year high in SHORT volume is achieved, and when a PIVOT POINT high is achieved (highest high over 51 sessions). When a new high in short volume is achieved the script aggregates the total volume and short volume for the 5 sessions prior to the new high, the session of the new high, and the 4 sessions after the new high (10 sessions). Additional volume calculations are performed for the 10 session period!
When a pivot point high is achieved the script aggregates the total volume and short volume for the 3 sessions prior to the pivot high, the session of the pivot high, and the 2 sessions after the new high (6 sessions). Additional volume calculations are performed for the 6 session period!
Red labels, red boxes, and red lines indicate a short volume ratio greater than or equal to 20% over the corresponding period!
Green labels, green boxes, and green lines indicate a short volume ratio less than 20% over the corresponding period!
Chart Champions - Part 2 - CCV IBs POCsThank you for sparing you time to read my indicator. 
This indicator has been created as a suite of 3. This was to ensure that those with only the Free Trading View account could benefit (with their restriction to 3 indicators). Please ensure you install each indicator and read each indicator write up to fully understand what has tried to achieved. 
 Chart Champions – Part 1 –Lvls nPOC VWAPS 
This indicator is broken down into:
•	Levels
•	VWAPS
•	Naked Point of Control
 Levels 
It displays the levels to the right of the price Axis to enable the user to have a cleaner chart.
The below levels will automatically appear:
dOpen – pdHigh – pdLow – pdEQ – pwEQ
Optional Levels include:
mOpen – pmOpen – pdOpen – dbyOpen – wOpen – pwOpen
 VWAPs 
Optional VWAPs
Daily (including pdVWAP close) – Weekly – Monthly
 Naked Points of Control (nPOC) 
To view the nPOC move the chart back in time to pick up the nPOCs.
 Chart Champions – Part 2 – CCV IBs POC 
This indicator is broken down into:
•	Chart Champions Value
•	Initial Balance
•	Points of Control
 Chart Champions Value (CCV) 
CCV is based on the 80% rule of the dOpen opening outside of the pdVAH/pdVAL. Please do you own research to fully understand how this trading strategy works (readily avaliable online).
 Initial Balance (IB) 
IB is based on the first 60 minutes of the market opening. It captures the highest and lowest points within that 60 minutes.  Please do you own research to fully understand how this trading strategy works (readily avaliable online).
 Points of Control (POCs) 
POC are the price levels where the most volume was traded.
Developing POC (dPOC) will constantly move with volume/price action through out the day. 
 Optional POCs 
Previous Day POC (pdPOC) – Day Before Yesterday POC (dbyPOC)
 Chart Champions – Part 3 – Sessions - Manual Input 
This indicator is broken down into:
•	Manual Inputs (daily, weekly, monthly)
•	IGOR SessionsTtimes
•	Pre + Market Openings
 Manual Input 
Daily x3
Weekly x 3
Monthly x 3
This allows the trader to put in specific levels.
 IGOR Session Times 
This is a user specific requirement to highlight cetain times during the day, displayed at the bottom of the chart in the colour strip. 
 Pre + Market Openings 
This allows the user to see when pre market trading has started and with the live maket has started, displayed at the top of the chart in colours.
A huge thank you goes out to:
Stackoverflow users AnyDozer and Bjorn.
TV user ahancock for allow me use of this code.
Disclaimer the lower the timeframe the more information it processes.
Chart Champions - Part 1 - nPOC - Levels - VWAPsThank you for sparing you time to read my indicator. 
This indicator has been created as a suite of 3. This was to ensure that those with only the Free Trading View account could benefit (with their restriction to 3 indicators). Please ensure you install each indicator and read each indicator write up to fully understand what has tried to achieved. 
 Chart Champions – Part 1 –Lvls nPOC VWAPS 
This indicator is broken down into:
•	Levels
•	VWAPS
•	Naked Point of Control
 Levels 
It displays the levels to the right of the price Axis to enable the user to have a cleaner chart.
The below levels will automatically appear:
dOpen – pdHigh – pdLow – pdEQ – pwEQ
Optional Levels include:
mOpen – pmOpen – pdOpen – dbyOpen – wOpen – pwOpen
 VWAPs 
Optional VWAPs
Daily (including pdVWAP close) – Weekly – Monthly
 Naked Points of Control (nPOC) 
To view the nPOC move the chart back in time to pick up the nPOCs.
 Chart Champions – Part 2 – CCV IBs POC 
This indicator is broken down into:
•	Chart Champions Value
•	Initial Balance
•	Points of Control
 Chart Champions Value (CCV) 
CCV is based on the 80% rule of the dOpen opening outside of the pdVAH/pdVAL. Please do you own research to fully understand how this trading strategy works (readily avaliable online).
 Initial Balance (IB) 
IB is based on the first 60 minutes of the market opening. It captures the highest and lowest points within that 60 minutes.  Please do you own research to fully understand how this trading strategy works (readily avaliable online).
 Points of Control (POCs) 
POC are the price levels where the most volume was traded.
Developing POC (dPOC) will constantly move with volume/price action through out the day. 
 Optional POCs 
Previous Day POC (pdPOC) – Day Before Yesterday POC (dbyPOC)
 Chart Champions – Part 3 – Sessions - Manual Input 
This indicator is broken down into:
•	Manual Inputs (daily, weekly, monthly)
•	IGOR SessionsTtimes
•	Pre + Market Openings
 Manual Input 
Daily x3
Weekly x 3
Monthly x 3
This allows the trader to put in specific levels.
 IGOR Session Times 
This is a user specific requirement to highlight cetain times during the day, displayed at the bottom of the chart in the colour strip. 
 Pre + Market Openings 
This allows the user to see when pre market trading has started and with the live maket has started, displayed at the top of the chart in colours.
A huge thank you goes out to:
Stackoverflow users AnyDozer and Bjorn.
TV user ahancock for allow me use of this code.
Disclaimer the lower the timeframe the more information it processes.
Average Volume at Time (AVAT)Calculation of average volume at current time for a number of previous sessions, known as Average Volume at Time (AVAT).
Inputs:
* period to use for accumulation. "D" is the default value, useful to view data for each session.
* number of previous sessions to average
TODO: more intelligent accumulation of number of bars in a session, since there may be sessions with different values
TODO: interpolate volume according to current time, inside of the last bar
Thiru-Killzones"Thiru-Killzones - Enhanced FX Market Sessions Indicator
This is an enhanced version of the popular FX Market Sessions indicator with the following improvements:
🔧 ENHANCEMENTS:
• Added 5th Session support (NYPM - New York PM session)
• Removed all alert functionality for cleaner chart display
• Optimized plot usage to stay within TradingView's 64-plot limit
• Cleaned up UI by removing bullet point separators
• Enhanced session box styling and visibility
• Improved table display with proper row management
📊 FEATURES:
• 5 customizable trading sessions (Asia, London, NYAM, Lunch, NYPM)
• Session time zones and extensions
• Opening range detection
• Fibonacci level overlays
• Bar coloring options
• Analysis tables with session statistics
🎯 USAGE:
Perfect for identifying key market sessions and their impact on price action. 
The 5-session setup provides comprehensive coverage of global FX markets.
Based on the original FX Market Sessions indicator by boitoki, enhanced with additional functionality."
Channels by TradingConTotoThis indicator plots clear and minimalistic High (H) and Low (L) pivot points only within the selected trading session (e.g., 10:00–12:00).
During the active session, the background is shaded for easy visual reference, and pivot labels alternate automatically — meaning no consecutive H or L points appear in a row. This makes it simple to identify real swing changes within a specific session.
⚙️ Features
Detects and labels pivots only during the chosen time range.
Alternating logic prevents consecutive highs or lows (H → L → H → L).
Clean session background highlight for visual clarity.
Fully customizable parameters (session time, sensitivity, colors, etc.).
Ideal for intraday traders, scalpers, and structure-based strategies.
💡 Suggested Use
Perfect for traders who focus on specific market sessions (e.g., New York, London, or custom hours).
The alternating pivot logic helps visualize market swings and structural shifts without visual clutter, making it an excellent companion for price action analysis.
Futures Key LevelsKey Levels — Sessions, Previous Ranges & Opens (Chicago-aligned sessions)
What it does
This indicator plots commonly used reference levels across multiple timeframes to help you frame the day and find confluence:
Sessions (Chicago TZ): London, New York, and Asia session high/low ranges.
Previous Period Ranges: Previous Day / Week / Month / Quarter / Year High/Low and optional Mid.
Opens: Current Daily / Weekly / Monthly / Quarterly / Yearly opens.
Intraday (4H): Previous 4-Hour High/Low + optional Mid.
Monday Range: Captures Monday’s High/Low (and optional Mid) to use as a weekly reference.
Price-scale markers: Optional markers that track key levels on the price scale without adding extra lines.
How it works (concepts & calculations)
Higher-timeframe values are retrieved using request.security() and update when a new period begins (e.g., previous day’s H/L become fixed at the start of the new day).
Session ranges are built from bar data within session windows using time(session, "America/Chicago"):
London: 02:00–05:00 CT
New York: 08:30–15:00 CT
Asia: 20:00–00:00 CT
“Mid” levels are simple midpoints between each period’s High and Low.
Merge Levels: when different levels land at the same price, their labels are merged to reduce clutter (e.g., “PDH / PWH”).
Why this version is useful / original bits
All-white baseline for clean charts; session colors stand out by design: London = Yellow, New York = Aquatic Blue, Asia = Red.
Right-anchored mode lets you park levels to the right side of the chart with a configurable anchor distance.
Label merging keeps the display minimal when multiple levels coincide.
Price-scale-only markers available when you prefer fewer lines on the chart.
Inputs & customization
Display Style: Standard or Right Anchored (+ distance controls).
Levels toggles: enable/disable each period (Daily/Weekly/Monthly/Quarterly/Yearly), Monday range, 4H range, and session ranges.
Text: optional shorthand labels (e.g., PDH/PDL, PWH/PWL).
Colors: global white theme, with session highlights; you can override in the Inputs.
Price-scale markers: on/off toggle.
How to use it
Use previous High/Low as liquidity pools and areas to watch for sweeps, breaks, or retests.
The Monday range often frames the rest of the week; breaks or rejections around Monday H/L can be informative.
The 4H previous range gives intraday context—great for mean-reversion vs. continuation reads.
Session ranges help you see where the active session expanded price and where liquidity may remain.
Notes & limitations
Sessions are computed in America/Chicago; higher-TF levels use the symbol’s exchange timezone.
This is an indicator, not a strategy; it does not place trades or claim performance.
Always combine levels with your own execution rules (structure, momentum, risk).
Credit: inspired by spacemanBTC; this version adds the all-white styling, Chicago-aligned sessions, right-anchoring, label merging, and price-scale markers.
Also my mentor to tell me about the levels
Disclaimer
This tool is for educational purposes only and is not financial advice. Markets involve risk; do your own research and manage risk appropriately.






















