Post 9/21 EMA Cross — Paint X Bars v2.0
# **Post 9/21 EMA Cross — Time Blocks & Session Colors**
This indicator highlights candles after a **9/21 EMA crossover**, but with extra controls that let you focus only on the sessions and time windows that matter to you.
---
## 🔑 What It Does
1. **EMA Cross Trigger**
* Bullish trigger: 9 EMA crosses above 21 EMA.
* Bearish trigger: 9 EMA crosses below 21 EMA.
2. **Bar Painting**
* After a valid cross, the indicator paints a set number of bars (you choose how many).
* You can require the **2nd bar to confirm momentum** (“displacement” filter) so weak signals are ignored.
3. **Time Block Control**
* Define up to **four custom time blocks** (like `08:00–09:30` or `12:00–13:00`).
* Painting only occurs inside those blocks if you enable the filter.
4. **Session-Aware Colors**
* Use one set of bullish/bearish colors for **regular hours**, another set for **pre-market**, and another for **post-market**.
* That way you can instantly see *when* the signal occurred.
---
## 🎨 Visuals
* Candles recolored in your chosen bull/bear colors.
* Optional EMA lines plotted on the chart for reference.
* Different colors for RTH, pre-market, and post-market activity.
---
## ⚙️ Inputs
* **EMA lengths (fast & slow)**
* **Number of bars to paint after a cross**
* **Displacement filter (loose or strict)**
* **Show/hide EMA lines**
* **Up to four custom time blocks** (on/off toggles + start/end times)
* **Bull/bear colors for RTH, Pre, Post**
---
## 📈 Why Use It
* **Clarity** – Only shows cross signals in the hours you actually trade.
* **Focus** – Different colors remind you at a glance whether the move was in pre-market, RTH, or post-market.
* **Discipline** – The optional 2nd-bar displacement filter prevents false starts by requiring real momentum.
---
## 🚨 Practical Use
* Treat the painted window as a **momentum phase**: enter on confirmation, manage risk while bars are painted, and stand aside once painting ends.
* Restrict painting to time blocks that match your personal trading routine (e.g., open drive 09:30–10:00, or late-day momentum 15:00–16:00).
* Use session colors to keep pre/post-market action separate from regular session strategies.
Indicators and strategies
Margin Cost Calculator Screener - Taylor V1.2# Leverage Position Cost Calculator & Stop Lose Cost Screener #
Designed to provide traders with crucial insights into their leveraged positions directly on the TradingView chart.
Key Features:
> Dynamic Display: Choose to view only the estimated entry cost, or a comprehensive overview including potential losses at specific stop-loss levels, and a custom remark.
> Contract Size Input: Easily specify the contract size for your trades.
> Leverage Level Input: Set your desired leverage level, with helpful tooltips explaining the margin requirements for various leverage ratios (e.g., 25x, 10x, 5x) and an included fee estimate.
> Cost Calculation: Accurately calculates the estimated entry cost for your position based on the current market price, contract size, and leverage.
> Stop-Loss Projections: It projects potential losses for stop-loss orders set at 3% and 5% below the entry price, helping you manage risk effectively.
> Clear Table Visualization: All calculated data is presented in a clean, organized table anchored to the bottom-left of your chart, making it easy to reference at a glance.
> Symbol Identification: Automatically displays the short ticker symbol for the asset you are analyzing.
This tool is invaluable for traders who utilize leverage and need a quick, visual way to understand their financial exposure and potential outcomes before entering or managing a trade.
Multiple Moving Averages5 Simple Moving Averages: 12, 20, 55, 80, 144 periods
Different colors: Each moving average uses a different color for easy distinction
Crossover signals: Display crossover signals for MA12/MA20 and MA55/MA144
Value display: Show current specific values of each moving average in a table at the top right corner
Optional EMA: The commented section provides code for the EMA version, which can be uncommented if needed
Weekly Session DividerThis indicator plots vertical divider lines at the start of each new weekly trading session (Sunday 8 PM ET / Monday 00:00 UTC in crypto).
It helps traders quickly spot the opening point of every weekly candle when viewing intraday charts.
Features:
Automatically detects the start of a new week using TradingView’s weekly time stamps.
Customizable line color, width, and style (solid, dashed, dotted).
Only displays on intraday timeframes to keep higher-timeframe charts clean.
Extends divider lines above and below the current chart for easy visibility.
Use case:
Great for crypto and futures traders who want to align intraday trading setups with higher-timeframe weekly opens, track session-to-session structure, or mark where the market’s new weekly trend may begin.
ICT Largest Midnight–00:30 FVG (NY, 1 per day) — FIXEDmarks out the first and largest fvg on the 1 min chart from midnight open until 12:30 am est
Triple Confirmation StrategyTriple Confirmation Strategy (TCS)
This indicator combines three different technical tools to provide more reliable entry signals:
RSI + Moving Average crossover → momentum confirmation
MACD line & signal crossover → trend direction signal
OBV + EMA crossover → volume-based confirmation
A signal is valid only if all three conditions occur within a given number of bars (default: 5). Optionally, it can be set to trigger only when the third confirmation happens at the current bar.
✨ Features
BUY / SELL markers on the chart
Alertcondition support → alerts can be set instantly
Grouped settings (RSI, MACD, OBV, Logic)
Diagnostic overlay (WSCD-style): RSI, MACD, and OBV visualized on a normalized –100…100 scale for easier monitoring
🎯 Usage
Suitable for both intraday and swing trading with default settings.
Parameters are fully customizable (lookback periods, bar window, diagnostic overlay).
Signals should not be used as a standalone trading system but are most effective when combined with broader context and other forms of analysis.
Volatility Monitor [HTF/LTF Maki]The way to set a buying and selling rule base on EMA in Multi Time Frame
Adaptive Gap Bands - DolphinTradeBot1️⃣ Overview
Adaptive Gap Bands is a momentum indicator that measures the percentage difference between fast and slow moving averages. This helps identify potential overbought or oversold zones.
The goal is to analyze “gap” behaviors within a trend and generate clearer entry–exit signals.
Since the bands are anchored to the slow moving average, they are more sensitive to the trend direction, making signals stronger in line with the prevailing trend.
📌 Signals do not repaint — once confirmed, they remain fixed on the chart.
2️⃣ How It Works ?
The indicator tracks the distance between fast and slow MAs.
The indicator measures the percentage gap between the fast and slow moving averages, relative to the slow MA.
Each time the gap reaches a new extreme during a swing, that value is stored.
When the averages cross, the stored values from the last N swings (defined by Swing Count) are collected.
These gap values are then averaged to create a smoother and more adaptive reference.
The bands are built by multiplying this average gap with the % Multiplier and projecting it around the slow MA.
3️⃣ How to Use It ?
Add the script to your chart.
Green label → potential Long signal.
Red label → potential Short signal.
Signals often appear when price moves outside the adaptive bands, showing extreme momentum.
Can also be used as a reference tool in manual trades to set profit/loss expectations.
By comparing upward vs. downward gaps, it can help analyze and confirm the dominant trend direction.
4️⃣⚙️ Settings
Swing Count → Number of past swings considered.
% Multiplier → Adjusts band width (narrower or wider).
MA Lengths & Types → Choose fast and slow moving averages (EMA, SMA, RMA, etc.).
ApicodeLibrary "Apicode"
percentToTicks(percent, from)
Converts a percentage of the average entry price or a specified price to ticks when the
strategy has an open position.
Parameters:
percent (float) : (series int/float) The percentage of the `from` price to express in ticks, e.g.,
a value of 50 represents 50% (half) of the price.
from (float) : (series int/float) Optional. The price from which to calculate a percentage and convert
to ticks. The default is `strategy.position_avg_price`.
Returns: (float) The number of ticks within the specified percentage of the `from` price if
the strategy has an open position. Otherwise, it returns `na`.
percentToPrice(percent, from)
Calculates the price value that is a specific percentage distance away from the average
entry price or a specified price when the strategy has an open position.
Parameters:
percent (float) : (series int/float) The percentage of the `from` price to use as the distance. If the value
is positive, the calculated price is above the `from` price. If negative, the result is
below the `from` price. For example, a value of 10 calculates the price 10% higher than
the `from` price.
from (float) : (series int/float) Optional. The price from which to calculate a percentage distance.
The default is `strategy.position_avg_price`.
Returns: (float) The price value at the specified `percentage` distance away from the `from` price
if the strategy has an open position. Otherwise, it returns `na`.
percentToCurrency(price, percent)
Parameters:
price (float) : (series int/float) The price from which to calculate the percentage.
percent (float) : (series int/float) The percentage of the `price` to calculate.
Returns: (float) The amount of the symbol's currency represented by the percentage of the specified
`price`.
percentProfit(exitPrice)
Calculates the expected profit/loss of the open position if it were to close at the
specified `exitPrice`, expressed as a percentage of the average entry price.
NOTE: This function may not return precise values for positions with multiple open trades
because it only uses the average entry price.
Parameters:
exitPrice (float) : (series int/float) The position's hypothetical closing price.
Returns: (float) The expected profit percentage from exiting the position at the `exitPrice`. If
there is no open position, it returns `na`.
priceToTicks(price)
Converts a price value to ticks.
Parameters:
price (float) : (series int/float) The price to convert.
Returns: (float) The value of the `price`, expressed in ticks.
ticksToPrice(ticks, from)
Calculates the price value at the specified number of ticks away from the average entry
price or a specified price when the strategy has an open position.
Parameters:
ticks (float) : (series int/float) The number of ticks away from the `from` price. If the value is positive,
the calculated price is above the `from` price. If negative, the result is below the `from`
price.
from (float) : (series int/float) Optional. The price to evaluate the tick distance from. The default is
`strategy.position_avg_price`.
Returns: (float) The price value at the specified number of ticks away from the `from` price if
the strategy has an open position. Otherwise, it returns `na`.
ticksToCurrency(ticks)
Converts a specified number of ticks to an amount of the symbol's currency.
Parameters:
ticks (float) : (series int/float) The number of ticks to convert.
Returns: (float) The amount of the symbol's currency represented by the tick distance.
ticksToStopLevel(ticks)
Calculates a stop-loss level using a specified tick distance from the position's average
entry price. A script can plot the returned value and use it as the `stop` argument in a
`strategy.exit()` call.
Parameters:
ticks (float) : (series int/float) The number of ticks from the position's average entry price to the
stop-loss level. If the position is long, the value represents the number of ticks *below*
the average entry price. If short, it represents the number of ticks *above* the price.
Returns: (float) The calculated stop-loss value for the open position. If there is no open position,
it returns `na`.
ticksToTpLevel(ticks)
Calculates a take-profit level using a specified tick distance from the position's average
entry price. A script can plot the returned value and use it as the `limit` argument in a
`strategy.exit()` call.
Parameters:
ticks (float) : (series int/float) The number of ticks from the position's average entry price to the
take-profit level. If the position is long, the value represents the number of ticks *above*
the average entry price. If short, it represents the number of ticks *below* the price.
Returns: (float) The calculated take-profit value for the open position. If there is no open
position, it returns `na`.
calcPositionSizeByStopLossTicks(stopLossTicks, riskPercent)
Calculates the entry quantity required to risk a specified percentage of the strategy's
current equity at a tick-based stop-loss level.
Parameters:
stopLossTicks (float) : (series int/float) The number of ticks in the stop-loss distance.
riskPercent (float) : (series int/float) The percentage of the strategy's equity to risk if a trade moves
`stopLossTicks` away from the entry price in the unfavorable direction.
Returns: (int) The number of contracts/shares/lots/units to use as the entry quantity to risk the
specified percentage of equity at the stop-loss level.
calcPositionSizeByStopLossPercent(stopLossPercent, riskPercent, entryPrice)
Calculates the entry quantity required to risk a specified percentage of the strategy's
current equity at a percent-based stop-loss level.
Parameters:
stopLossPercent (float) : (series int/float) The percentage of the `entryPrice` to use as the stop-loss distance.
riskPercent (float) : (series int/float) The percentage of the strategy's equity to risk if a trade moves
`stopLossPercent` of the `entryPrice` in the unfavorable direction.
entryPrice (float) : (series int/float) Optional. The entry price to use in the calculation. The default is
`close`.
Returns: (int) The number of contracts/shares/lots/units to use as the entry quantity to risk the
specified percentage of equity at the stop-loss level.
exitPercent(id, lossPercent, profitPercent, qty, qtyPercent, comment, alertMessage)
A wrapper for the `strategy.exit()` function designed for creating stop-loss and
take-profit orders at percentage distances away from the position's average entry price.
NOTE: This function calls `strategy.exit()` without a `from_entry` ID, so it creates exit
orders for *every* entry in an open position until the position closes. Therefore, using
this function when the strategy has a pyramiding value greater than 1 can lead to
unexpected results. See the "Exits for multiple entries" section of our User Manual's
"Strategies" page to learn more about this behavior.
Parameters:
id (string) : (series string) Optional. The identifier of the stop-loss/take-profit orders, which
corresponds to an exit ID in the strategy's trades after an order fills. The default is
`"Exit"`.
lossPercent (float) : (series int/float) The percentage of the position's average entry price to use as the
stop-loss distance. The function does not create a stop-loss order if the value is `na`.
profitPercent (float) : (series int/float) The percentage of the position's average entry price to use as the
take-profit distance. The function does not create a take-profit order if the value is `na`.
qty (float) : (series int/float) Optional. The number of contracts/lots/shares/units to close when an
exit order fills. If specified, the call uses this value instead of `qtyPercent` to
determine the order size. The exit orders reserve this quantity from the position, meaning
other orders from `strategy.exit()` cannot close this portion until the strategy fills or
cancels those orders. The default is `na`, which means the order size depends on the
`qtyPercent` value.
qtyPercent (float) : (series int/float) Optional. A value between 0 and 100 representing the percentage of the
open trade quantity to close when an exit order fills. The exit orders reserve this
percentage from the open trades, meaning other calls to this command cannot close this
portion until the strategy fills or cancels those orders. The percentage calculation
depends on the total size of the applicable open trades without considering the reserved
amount from other `strategy.exit()` calls. The call ignores this parameter if the `qty`
value is not `na`. The default is 100.
comment (string) : (series string) Optional. Additional notes on the filled order. If the value is specified
and not an empty "string", the Strategy Tester and the chart show this text for the order
instead of the specified `id`. The default is `na`.
alertMessage (string) : (series string) Optional. Custom text for the alert that fires when an order fills. If the
value is specified and not an empty "string", and the "Message" field of the "Create Alert"
dialog box contains the `{{strategy.order.alert_message}}` placeholder, the alert message
replaces the placeholder with this text. The default is `na`.
Returns: (void) The function does not return a usable value.
closeAllAtEndOfSession(comment, alertMessage)
A wrapper for the `strategy.close_all()` function designed to close all open trades with a
market order when the last bar in the current day's session closes. It uses the command's
`immediately` parameter to exit all trades at the last bar's `close` instead of the `open`
of the next session's first bar.
Parameters:
comment (string) : (series string) Optional. Additional notes on the filled order. If the value is specified
and not an empty "string", the Strategy Tester and the chart show this text for the order
instead of the automatically generated exit identifier. The default is `na`.
alertMessage (string) : (series string) Optional. Custom text for the alert that fires when an order fills. If the
value is specified and not an empty "string", and the "Message" field of the "Create Alert"
dialog box contains the `{{strategy.order.alert_message}}` placeholder, the alert message
replaces the placeholder with this text. The default is `na`.
Returns: (void) The function does not return a usable value.
closeAtEndOfSession(entryId, comment, alertMessage)
A wrapper for the `strategy.close()` function designed to close specific open trades with a
market order when the last bar in the current day's session closes. It uses the command's
`immediately` parameter to exit the trades at the last bar's `close` instead of the `open`
of the next session's first bar.
Parameters:
entryId (string)
comment (string) : (series string) Optional. Additional notes on the filled order. If the value is specified
and not an empty "string", the Strategy Tester and the chart show this text for the order
instead of the automatically generated exit identifier. The default is `na`.
alertMessage (string) : (series string) Optional. Custom text for the alert that fires when an order fills. If the
value is specified and not an empty "string", and the "Message" field of the "Create Alert"
dialog box contains the `{{strategy.order.alert_message}}` placeholder, the alert message
replaces the placeholder with this text. The default is `na`.
Returns: (void) The function does not return a usable value.
sortinoRatio(interestRate, forceCalc)
Calculates the Sortino ratio of the strategy based on realized monthly returns.
Parameters:
interestRate (simple float) : (simple int/float) Optional. The *annual* "risk-free" return percentage to compare against
strategy returns. The default is 2, meaning it uses an annual benchmark of 2%.
forceCalc (bool) : (series bool) Optional. A value of `true` forces the function to calculate the ratio on the
current bar. If the value is `false`, the function calculates the ratio only on the latest
available bar for efficiency. The default is `false`.
Returns: (float) The Sortino ratio, which estimates the strategy's excess return per unit of
downside volatility.
sharpeRatio(interestRate, forceCalc)
Calculates the Sharpe ratio of the strategy based on realized monthly returns.
Parameters:
interestRate (simple float) : (simple int/float) Optional. The *annual* "risk-free" return percentage to compare against
strategy returns. The default is 2, meaning it uses an annual benchmark of 2%.
forceCalc (bool) : (series bool) Optional. A value of `true` forces the function to calculate the ratio on the
current bar. If the value is `false`, the function calculates the ratio only on the latest
available bar for efficiency. The default is `false`.
Returns: (float) The Sortino ratio, which estimates the strategy's excess return per unit of
total volatility.
inside forex vip📌 SuperTrend
Based on:
ATR Period (default 10).
Multiplier ATR (default 3).
Calculates the trend direction (upward/downward).
Generates buy/sell signals:
Buy: Positive crossover with EMA color matching (bullish).
Sell: Negative crossover with EMA color matching (bearish).
Smart Money Concepts with RSI/MA Signalit gives an alert when price is in bullish ob and rsi crossover SMA
Daily + 4H MACD & RSI Screeneri used this script for my swing trading entry.
//@version=5
indicator("Daily + 4H MACD & RSI Screener", overlay=false)
// settings
rsiLength = input.int(14, "RSI Length")
rsiLevel = input.int(50, "RSI Threshold")
macdFast = input.int(12, "MACD Fast")
macdSlow = input.int(26, "MACD Slow")
macdSignal = input.int(9, "MACD Signal")
// ---- daily timeframe ----
dailyRsi = request.security(syminfo.tickerid, "D", ta.rsi(close, rsiLength))
= request.security(syminfo.tickerid, "D", ta.macd(close, macdFast, macdSlow, macdSignal))
dailyRsiPass = dailyRsi < rsiLevel
dailyMacdPass = dailyMacd < 0
dailyCondition = dailyRsiPass and dailyMacdPass
// ---- 4H timeframe ----
h4Rsi = request.security(syminfo.tickerid, "240", ta.rsi(close, rsiLength))
= request.security(syminfo.tickerid, "240", ta.macd(close, macdFast, macdSlow, macdSignal))
h4RsiPass = h4Rsi < rsiLevel
h4MacdPass = h4Macd < 0
h4Condition = h4RsiPass and h4MacdPass
// ---- combined condition ----
finalCondition = dailyCondition and h4Condition
// plot signals
plotshape(finalCondition, style=shape.triangledown, location=location.top, color=color.red, size=size.large, title="Signal")
bgcolor(finalCondition ? color.new(color.red, 85) : na)
// ---- table (3 columns x 4 rows) ----
var table statusTable = table.new(position=position.top_right, columns=3, rows=4, border_width=1)
// headers
table.cell(statusTable, 0, 0, "Timeframe", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 0, "RSI", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 2, 0, "MACD", text_color=color.white, bgcolor=color.new(color.black, 0))
// daily row
table.cell(statusTable, 0, 1, "Daily", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 1, str.tostring(dailyRsi, "#.##"),
text_color=color.white, bgcolor=dailyRsiPass ? color.new(color.green, 60) : color.new(color.red, 60))
table.cell(statusTable, 2, 1, str.tostring(dailyMacd, "#.##"),
text_color=color.white, bgcolor=dailyMacdPass ? color.new(color.green, 60) : color.new(color.red, 60))
// 4H row
table.cell(statusTable, 0, 2, "4H", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(statusTable, 1, 2, str.tostring(h4Rsi, "#.##"),
text_color=color.white, bgcolor=h4RsiPass ? color.new(color.green, 60) : color.new(color.red, 60))
table.cell(statusTable, 2, 2, str.tostring(h4Macd, "#.##"),
text_color=color.white, bgcolor=h4MacdPass ? color.new(color.green, 60) : color.new(color.red, 60))
// status row (simulate colspan by using two adjacent cells with the same bgcolor)
table.cell(statusTable, 0, 3, "Status", text_color=color.white, bgcolor=color.new(color.black, 0))
statusText = finalCondition ? "match" : "no match"
statusBg = finalCondition ? color.new(color.green, 0) : color.new(color.red, 0)
table.cell(statusTable, 1, 3, statusText, text_color=color.white, bgcolor=statusBg, text_size=size.large)
table.cell(statusTable, 2, 3, "", text_color=color.white, bgcolor=statusBg)
Books Lines 簡易版(無効化付き・設定自由)
⸻
📌 インジケーター説明文
🇯🇵 日本語
このインジケーターは、ゴールド5分足で作成者が実際に使用している「Booksライン」をシンプル化したものです。
主な機能は ラインの生成・無効化・アラート通知 です。リタッチ判定や二重サイン防止などの複雑な処理は省略されています。
📍 利用上の注意
• 使用前に必ずご自身で検証してください。
• ドルストレートの通貨ペアでも利用可能です。
👉 日本人ユーザーの方は、ケメコ様による以下の記事の【追記】「Books」について(2024年七夕)も参考にしてください:
note.com
👉 詳細な参考として、こちらの動画をご覧ください:
youtu.be
⸻
🇺🇸 English
This indicator is a simplified version of the “Books Lines” that the creator personally uses on Gold (XAUUSD) 5-minute charts.
The main functions are line creation, invalidation, and alerts. Retouch detection and anti-double signal logic have been removed for simplicity.
📍 Usage Notes
• Please backtest thoroughly before using it in live trading.
• It can also be applied to USD currency pairs (Dollar-straight pairs).
👉 For Japanese users, we also recommend referring to Kemeko’s article: 【Additional Note】 “Books” (July 7, 2024):
note.com
👉 For further reference, please check this video:
youtu.be
⸻
TQQQ – 200 SMA ±5% Entry / –3% Exit (since 2010) • Metrics by DE✅ In plain words:
You only buy TQQQ when it’s trading 5% above its 200-day SMA (a sign of strong uptrend momentum).
You stay long as long as the price holds above 3% below the 200-day SMA.
If price falls below that lower threshold, you exit to limit drawdown.
The strategy is designed to catch strong uptrends while cutting losses early.
Hilly's 0010110 Reversal Scalping Strategy - 5 Min CandlesKey Features and Rationale:
Timeframe: Restricted to 5-minute candles as requested.
Pattern Integration: Includes single (Hammer, Shooting Star, Doji), two (Engulfing, Harami), and three-plus (Morning Star, Evening Star) candlestick patterns, plus reversal patterns based on RSI extremes.
VWAP Cross: Incorporates bullish (price crosses above VWAP) and bearish (price crosses below VWAP) signals, enhanced by trend context.
Volume Analysis: Uses a volume spike threshold to filter noise, with a simple day-start volume comparison for financial environment context.
Financial Environment: Approximates the day's sentiment using early-hour volume compared to current volume, adjusted by trend.
Aggregation: Scores each condition (e.g., 1 for basic patterns, 2 for strong patterns like Engulfing, 3 for three-candle patterns) and decides based on weighted consensus, with trendStrength as a tunable threshold.
Risky Approach: Minimal filtering and a low trendStrength (default 0.5) allow frequent signals, aligning with your $100-to-$200 goal, but expect higher risk.
Suggested Inputs:
EMA Length: 10 (short enough for 5-minute sensitivity).
VWAP Lookback: 1 (uses current session VWAP).
Volume Threshold Multiplier: 1.2 (moderate spike requirement).
RSI Length: 14 (standard, adjustable to 7 for more sensitivity).
Trend Strength Threshold: 0.5 (balance between signals; lower to 0.4 for more trades, raise to 0.6 for fewer).
EMA100 Bounce Tracker (Support Only)Reversal Traders can use this to trade bounces from the EMA100 on any TF! :)
Position Size Calculatorposition size for futures, topstep apex etc, you typing your risk and stop loss pips and it shows you how many lots you should get
Prev-Day POC Hit Rate (v6, RTH, tolerance)//@version=6
indicator("Prev-Day POC Hit Rate (v6, RTH, tolerance)", overlay=true)
// ---- Inputs
sessionStr = input.session("0930-1600", "RTH session (exchange time)")
tolPoints = input.float(0.10, "Tolerance (points)")
tolPercent = input.float(0.10, "Tolerance (%) of prev POC")
showMarks = input.bool(true, "Show touch markers")
// ---- RTH gating in exchange TZ
sessFlag = time(timeframe.period, sessionStr)
inRTH = not na(sessFlag)
rthOpen = inRTH and not inRTH
rthClose = (not inRTH) and inRTH
// ---- Prior-day POC proxy = price of highest-volume 1m bar of prior RTH
var float prevPOC = na
var float curPOC = na
var float curMaxVol = 0.0
// ---- Daily hit stats
var bool hitToday = false
var int days = 0
var int hits = 0
// Finalize a day at RTH close (count touch to prevPOC)
if rthClose and not na(prevPOC)
days += 1
if hitToday
hits += 1
// Roll today's POC to prevPOC at next RTH open; reset builders/flags
if rthOpen
prevPOC := curPOC
curPOC := na
curMaxVol := 0.0
hitToday := false
// Build today's proxy POC during RTH (highest-volume 1m bar)
if inRTH
if volume > curMaxVol
curMaxVol := volume
curPOC := close // swap to (high+low+close)/3 if you prefer HLC3
// ---- Touch test against prevPOC (band = max(points, % of prevPOC))
bandPts = na(prevPOC) ? na : math.max(tolPoints, prevPOC * tolPercent * 0.01)
touched = inRTH and not na(prevPOC) and high >= (prevPOC - bandPts) and low <= (prevPOC + bandPts)
if touched
hitToday := true
// ---- Plots
plot(prevPOC, "Prev RTH POC (proxy)", color=color.new(color.fuchsia, 0), linewidth=2, style=plot.style_linebr)
bgcolor(hitToday and inRTH ? color.new(color.green, 92) : na)
plotshape(showMarks and touched ? prevPOC : na, title="Touch prev POC",
style=shape.circle, location=location.absolute, size=size.tiny, color=color.new(color.aqua, 0))
// ---- On-chart stats
hitPct = days > 0 ? (hits * 100.0 / days) : na
var table T = table.new(position.top_right, 2, 3, border_width=1)
if barstate.islastconfirmedhistory
table.cell(T, 0, 0, "Days")
table.cell(T, 1, 0, str.tostring(days))
table.cell(T, 0, 1, "Hits")
table.cell(T, 1, 1, str.tostring(hits))
table.cell(T, 0, 2, "Hit %")
table.cell(T, 1, 2, na(hitPct) ? "—" : str.tostring(hitPct, "#.0") + "%")
63-Day Sector Relative Strength vs NIFTYThis script calculates and displays the 63-day returns of major NSE sectoral indices and their relative strength versus the NIFTY 50.
It,
Covered Indices: CNXIT, CNXAUTO, CNXFMCG, CNXPHARMA, CNXENERGY, CNXMETAL, CNXPSUBANK, CNXINFRA, CNXREALTY, CNXFINANCE, CNXMEDIA, BANKNIFTY, CNXCONSUMPTION, CNXCOMMODITIES
How to use this: Quickly identify which sectors are outperforming or underperforming relative to the NIFTY over the past 63 trading sessions (approx. 3 months).
Small-Cap — Sell Every Spike (Rendon1) Small-Cap — Sell Every Spike v6 — Strict, No Look-Ahead
Educational use only. This is not financial advice or a signal service.
This strategy targets low/ mid-float runners (≤ ~20M) that make parabolic spikes. It shorts qualified spikes and scales out into flushes. Logic is deliberately simple and transparent to avoid curve-fit.
What the strategy does
Detects a parabolic up move using:
Fast ROC over N bars
Big range vs ATR
Volume spike vs SMA
Fresh higher high (no stale spikes)
Enters short at bar close when conditions are met (no same-bar fills).
Manages exits with ATR targets and optional % covers.
Tracks float rotation intraday (manual float input) and blocks trades above a hard limit.
Draws daily spike-high resistance from confirmed daily bars (no repaint / no look-ahead).
Timeframes & market
Designed for 1–5 minute charts.
Intended for US small-caps; turn Premarket on.
Works intraday; avoid illiquid tickers or names with constant halts.
Entry, Exit, Risk (short side)
Entry: parabolic spike (ROC + Range≥ATR×K + Vol≥SMA×K, new HH).
Optional confirmations (OFF by default to “sell every spike”): upper-wick and VWAP cross-down.
Stop: ATR stop above entry (default 1.2× ATR).
Targets: TP1 = 1.0× ATR, TP2 = 2.0× ATR + optional 10/20/30% covers.
Safety: skip trades if RVOL is low or Float Rotation exceeds your limit (default warn 5×, hard 7×).
Inputs (Balanced defaults)
Price band: $2–$10
Float Shares: set per ticker (from Finviz).
RVOL(50) ≥ 1.5×
ROC(5) ≥ 1.0%, Range ≥ 1.6× ATR, Vol ≥ 1.8× SMA
Cooldown: 10 bars; Max trades/day: 6
Optional: Require wick (≥35%) and/or Require VWAP cross-down.
Presets suggestion:
• Balanced (defaults above)
• Safer: wick+VWAP ON, Range≥1.8×, trades/day 3–4
• Micro-float (<5M): ROC 1.4–1.8%, Range≥1.9–2.2×, Vol≥2.2×, RVOL≥2.0, wick 40–50%
No look-ahead / repaint notes
Daily spike-highs use request.security(..., lookahead_off) and shifted → only closed daily bars.
Orders arm next bar after entry; entries execute at bar close.
VWAP/ATR/ROC/Vol/RVOL are computed on the chart timeframe (no HTF peeking).
How to use
Build a watchlist: Float <20M, RelVol >2, Today +20% (Finviz).
Open 1–5m chart, enter Float Shares for the ticker.
Start with Balanced, flip to Safer on halty/SSR names or repeated VWAP reclaims.
Scale out into flushes; respect the stop and rotation guard.
Limitations & risk
Backtests on small-caps can be optimistic due to slippage, spreads, halts, SSR, and limited premarket data. Always use conservative sizing. Low-float stocks can squeeze violently.
Alerts
Parabolic UP (candidate short)
SHORT Armed (conditions met; entry at bar close)
High-and-Tight Impulse + Micro ConsolidationThis indicator detects a specific bullish continuation setup on daily charts:
- An impulse move (X% rise within N bars, mostly green candles)
- Immediately followed by a tight consolidation (small ranges, small bodies)
- Closes holding in the top zone of the impulse
On the chart, signals are plotted as orange dots above bars.
Labels show the last detected setup date, and a counter displays total matches in history.
Useful for backtesting "high-and-tight flag" type momentum patterns or any symbol.
Adjust inputs (impulse % threshold, bars, ATR ratios, top zone %) to make it stricter or looser.
Alerts are included when a new setup is detected.
This tool is not financial advice. For educational and research purposes only.
by fiyatherseydir