Search in scripts for "entry"
ENTRY CONFIRMATION V2An indicator from candle man. Helps determine whether supply and demand zone are truly supply or demand.
Entry Percent: EssamThis Pine Script code is designed to perform the task of computing and showcasing the profit percentage, profit value, and the duration for which a specific asset is held, all in real-time. The script effectively leverages the built-in resources to provide a seamless and robust experience, as it presents the calculated figures in an easily readable format on the chart, without causing any lag or disruptions to the chart.
MA_Script- Entry Point : base on MA20, MA50, MA100, MA200.
- Exit Point : base on stop loss, MA and trailing stop.
sa-strategy with HTF-TSLEntry- based on HA close above HMA confirmation done with ST and HTF ATR
Exit- based on close below ATR which works as trailing SL
[MV] %B with SMA + Volume Based Colored Bars
Entry Signal when %B Crosses with SMA and this is more meaningful if it supports colored bars.
Black Bar when prices go down and volume is bigger than 150% of its average, that indicates us price action is supported by a strong bearish volume
Blue Bar when prices go up and volume bigger than 150% of its average, that indicates us price action is supported by a strong bullish volume
VBC author @KIVANCfr3762
FX Sniper: T3-CCI Strategy - With 100 IndicatorsEntry signal when moving above -100, sell signal when going below 100
Amazing Crossover SystemEntry Rules
BUY when the 5 EMA crosses above the 10 EMA from underneath and the RSI crosses above the 50.0 mark from the bottom.
SELL when the 5 EMA crosses below the 10 EMA from the top and the RSI crosses below the 50.0 mark from the top.
Make sure that the RSI did cross 50.0 from the top or bottom and not just ranging tightly around the level.
How to setup Alert:
1) Add the Amazing Crossover System to your chart via Indicators
2) Find your currency pair
3) Set the timeframe on the chart to 1 hour
4) Press 'Alt + A' (create alert shortcut)
5) Set the following criteria for the alert:
Condition = 'Amazing Crossover System', Plot, ' BUY Signal'
The rest of the alert can be customized to your preferences
5) Repeat steps 1 - 4, but set the Condition = 'Amazing Crossover System', Plot, ' SELL Signal'
CRT + SMC MY//@version=5
indicator("CRT + SMC MultiTF (Fixed Requests)", overlay=true, max_labels_count=500, max_boxes_count=200)
// ---------------- INPUTS ----------------
htfTF = input.string("60", title="HTF timeframe (60=1H, 240=4H)")
midTF = input.string("5", title="Mid timeframe (5 or 15)")
execTF = input.string("1", title="Exec timeframe (1 for sniper)")
useMAfilter = input.bool(true, "Require HTF MA filter")
htf_ma_len = input.int(50, "HTF MA length")
showOB = input.bool(true, "Show Order Blocks (midTF)")
showFVG = input.bool(true, "Show Fair Value Gaps (execTF)")
showEntries = input.bool(true, "Show Entry arrows & SL/TP")
slBuffer = input.int(3, "SL buffer (ticks)")
rrTarget = input.float(4.0, "Default R:R target")
useKillzone = input.bool(false, "Use London/NY Killzone (approx NY-5 timezone)")
// ---------------- REQUESTS (ALL at top-level) ----------------
// HTF series
htf_open = request.security(syminfo.tickerid, htfTF, open)
htf_high = request.security(syminfo.tickerid, htfTF, high)
htf_low = request.security(syminfo.tickerid, htfTF, low)
htf_close = request.security(syminfo.tickerid, htfTF, close)
htf_ma = request.security(syminfo.tickerid, htfTF, ta.sma(close, htf_ma_len))
htf_prev_high = request.security(syminfo.tickerid, htfTF, high )
htf_prev_low = request.security(syminfo.tickerid, htfTF, low )
// midTF series for OB detection
mid_open = request.security(syminfo.tickerid, midTF, open)
mid_high = request.security(syminfo.tickerid, midTF, high)
mid_low = request.security(syminfo.tickerid, midTF, low)
mid_close = request.security(syminfo.tickerid, midTF, close)
mid_median_body = request.security(syminfo.tickerid, midTF, ta.median(math.abs(close - open), 8))
// execTF series for FVG and micro structure
exec_high = request.security(syminfo.tickerid, execTF, high)
exec_low = request.security(syminfo.tickerid, execTF, low)
exec_open = request.security(syminfo.tickerid, execTF, open)
exec_close = request.security(syminfo.tickerid, execTF, close)
// Also get shifted values needed for heuristics (all top-level)
exec_high_1 = request.security(syminfo.tickerid, execTF, high )
exec_high_2 = request.security(syminfo.tickerid, execTF, high )
exec_low_1 = request.security(syminfo.tickerid, execTF, low )
exec_low_2 = request.security(syminfo.tickerid, execTF, low )
mid_low_1 = request.security(syminfo.tickerid, midTF, low )
mid_high_1 = request.security(syminfo.tickerid, midTF, high )
// ---------------- HTF logic ----------------
htf_ma_bias_long = htf_close > htf_ma
htf_ma_bias_short = htf_close < htf_ma
htf_sweep_high = (htf_high > htf_prev_high) and (htf_close < htf_prev_high)
htf_sweep_low = (htf_low < htf_prev_low) and (htf_close > htf_prev_low)
htf_final_long = htf_sweep_low and (not useMAfilter or htf_ma_bias_long)
htf_final_short = htf_sweep_high and (not useMAfilter or htf_ma_bias_short)
// HTF label (single label updated)
var label htf_label = na
if barstate.islast
label.delete(htf_label)
if htf_final_long
htf_label := label.new(bar_index, high, "HTF BIAS: LONG", style=label.style_label_left, color=color.green, textcolor=color.white)
else if htf_final_short
htf_label := label.new(bar_index, low, "HTF BIAS: SHORT", style=label.style_label_left, color=color.red, textcolor=color.white)
// ---------------- midTF OB detection (heuristic) ----------------
mid_body = math.abs(mid_close - mid_open)
is_bear_mid = (mid_open > mid_close) and (mid_body >= mid_median_body)
is_bull_mid = (mid_open < mid_close) and (mid_body >= mid_median_body)
mid_bear_disp = is_bear_mid and (mid_low < mid_low_1)
mid_bull_disp = is_bull_mid and (mid_high > mid_high_1)
// Store last OB values (safe top-level assignments)
var float last_bear_ob_top = na
var float last_bear_ob_bot = na
var int last_bear_ob_time = na
var float last_bull_ob_top = na
var float last_bull_ob_bot = na
var int last_bull_ob_time = na
if mid_bear_disp
last_bear_ob_top := mid_open
last_bear_ob_bot := mid_close
last_bear_ob_time := timenow
if mid_bull_disp
last_bull_ob_top := mid_close
last_bull_ob_bot := mid_open
last_bull_ob_time := timenow
// Draw OB boxes (draw always but can be toggled)
if showOB
if not na(last_bear_ob_top)
box.new(bar_index - 1, last_bear_ob_top, bar_index + 1, last_bear_ob_bot, border_color=color.new(color.red,0), bgcolor=color.new(color.red,85))
if not na(last_bull_ob_top)
box.new(bar_index - 1, last_bull_ob_top, bar_index + 1, last_bull_ob_bot, border_color=color.new(color.green,0), bgcolor=color.new(color.green,85))
// ---------------- execTF FVG detection (top-level logic) ----------------
// simple 3-candle gap heuristic
bull_fvg_local = exec_low_2 > exec_high_1
bear_fvg_local = exec_high_2 < exec_low_1
// Compute FVG box coords at top-level
fvg_bull_top = exec_high_1
fvg_bull_bot = exec_low_2
fvg_bear_top = exec_high_2
fvg_bear_bot = exec_low_1
if showFVG
if bull_fvg_local
box.new(bar_index - 2, fvg_bull_top, bar_index, fvg_bull_bot, border_color=color.new(color.green,0), bgcolor=color.new(color.green,85))
if bear_fvg_local
box.new(bar_index - 2, fvg_bear_top, bar_index, fvg_bear_bot, border_color=color.new(color.red,0), bgcolor=color.new(color.red,85))
// ---------------- micro structure on execTF ----------------
micro_high = exec_high
micro_low = exec_low
micro_high_1 = exec_high_1
micro_low_1 = exec_low_1
micro_bos_long = micro_high > micro_high_1
micro_bos_short = micro_low < micro_low_1
// ---------------- killzone check (top-level) ----------------
kill_ok = true
if useKillzone
hh = hour(time('GMT-5'))
mm = minute(time('GMT-5'))
// London approx
inLondon = (hh > 2 or (hh == 2 and mm >= 45)) and (hh < 5 or (hh == 5 and mm <= 0))
inNY = (hh > 8 or (hh == 8 and mm >= 20)) and (hh < 11 or (hh == 11 and mm <= 30))
kill_ok := inLondon or inNY
// ---------------- Entry logic (top-level boolean decisions) ----------------
hasBullOB = not na(last_bull_ob_top)
hasBearOB = not na(last_bear_ob_top)
entryLong = htf_final_long and hasBullOB and micro_bos_long and bull_fvg_local and kill_ok
entryShort = htf_final_short and hasBearOB and micro_bos_short and bear_fvg_local and kill_ok
// ---------------- SL / TP suggestions and plotting ----------------
var label lastEntryLabel = na
if entryLong or entryShort
entryPrice = close
suggestedSL = entryLong ? (htf_low - slBuffer * syminfo.mintick) : (htf_high + slBuffer * syminfo.mintick)
slDist = math.abs(entryPrice - suggestedSL)
suggestedTP = entryLong ? (entryPrice + slDist * rrTarget) : (entryPrice - slDist * rrTarget)
if showEntries
label.delete(lastEntryLabel)
lastEntryLabel := label.new(bar_index, entryPrice, entryLong ? "ENTRY LONG" : "ENTRY SHORT", style=label.style_label_center, color=entryLong ? color.green : color.red, textcolor=color.white)
line.new(bar_index, suggestedSL, bar_index + 20, suggestedSL, color=color.orange, style=line.style_dashed)
line.new(bar_index, suggestedTP, bar_index + 40, suggestedTP, color=color.aqua, style=line.style_dashed)
plotshape(entryLong, title="Entry Long", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(entryShort, title="Entry Short", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
alertcondition(entryLong, title="CRT SMC Entry Long", message="Entry Long — HTF bias + midTF OB + execTF confirmation")
alertcondition(entryShort, title="CRT SMC Entry Short", message="Entry Short — HTF bias + midTF OB + execTF confirmation")
Algoticks.in: Bollinger Bands Strategy (Sample)Bollinger Bands Strategy - User Guide
Overview
This is a Mean Reversion strategy using Bollinger Bands. It generates trading signals when price moves outside the bands and then crosses back, or simply crosses the bands depending on the logic. It integrates with Algoticks.in API for automated trading on Delta Exchange.
Strategy Logic
Long Signal: When Price crosses below the Lower Band (Oversold / Dip Buy)
Short Signal: When Price crosses above the Upper Band (Overbought / Top Sell)
Automatically closes opposite positions before entering new ones
Quick Setup
1. Add to TradingView
Open TradingView and go to the chart
Click "Pine Editor" at the bottom
Paste the script code
Click "Add to Chart"
2. Configure Strategy Parameters
Strategy Settings
Length (default: 20): The lookback period for the SMA basis
StdDev (default: 2.0): The number of standard deviations for the bands
General API Settings
Paper Trading : Enable for testing without real money
Signal Type : Choose "Trading Signal" (default) for tracking
Exchange : DELTA (Delta Exchange)
Segment :
futures - Perpetual contracts
options - Call/Put options
spot - Spot trading
Order Settings: Basic
Quantity : Number of contracts (e.g., 1, 0.5, 2)
Validity :
GTC - Good Till Cancelled
IOC - Immediate or Cancel
FOK - Fill or Kill
DAY - Day order
Product : cross_margin or isolated_margin
Order Settings: Entry Type
Choose how orders are executed:
Market Order : Immediate fill at best price
Limit Order : Fill at specified price or better
Stop Market : Triggers at stop price, then market order
Stop Limit : Triggers at stop price, then limit order
Entry Prices (for Limit/Stop orders)
Limit Price:
Price : The value to use
Type : Last Price / Mark Price / Index Price
Mode :
Absolute - Exact price (e.g., 65000)
Relative - Offset from entry price
% Checkbox : If checked, relative uses percentage; if unchecked, uses points
Example:
Absolute: 65000 → Order at exactly 65000
Relative 1% (checked): Entry ± 1% of entry price
Relative 100 (unchecked): Entry ± 100 points
Trigger Price: Same logic as Limit Price, used for Stop orders
Exit / Bracket Prices (SL/TP)
Stop Loss (SL):
Type : Price type to monitor (Mark Price recommended)
Mode : Absolute or Relative
% : Percentage or points
SL : Stop loss value (e.g., 2 for 2%)
Trig : Optional trigger price (creates Stop-Limit SL)
Take Profit (TP): Same structure as SL
Example:
Long entry at 65000, SL = 2% → Exit at 63700 (65000 - 2%)
Short entry at 65000, TP = 3% → Exit at 63050 (65000 - 3%)
3. Options Trading Setup (Only if Segment = Options)
Strike Selection Method
User Defined Mode:
Manually specify exact strike and option type
Best for: Trading specific levels
Required fields:
Strike Price : e.g., "65000"
Option Type : Call or Put
Dynamic Mode:
System calculates strike based on ATM price
Best for: Automated strategies
Required fields:
Algo Type : Options Buying or Selling
Strike Offset : 0 (ATM), +1 (above ATM), -1 (below ATM)
Strike Interval : Gap between strikes (e.g., BTC: 500, ETH: 50)
Expiry Date Formats:
T+0 - Today
T+1 - Tomorrow
current week - This Friday
next week - Next Friday
current month - Last Friday of month
131125 - Specific date (13 Nov 2025)
4. Create Alert for Automation
Right-click on chart → "Add Alert"
Condition : Select your strategy name
Alert Actions : Webhook URL
Webhook URL : Your Algoticks.in API endpoint
Message : Leave as {{strategy.order.alert_message}} (contains JSON)
Click "Create"
The alert will automatically send JSON payloads to your API when signals occur.
Example Configurations
Standard Mean Reversion
Strategy: Length = 20, StdDev = 2.0
Segment: futures
Order Type: market_order
Quantity: 1
SL: 1% (Relative)
TP: 2% (Relative)
Wide Band Reversal
Strategy: Length = 20, StdDev = 2.5
Segment: futures
Order Type: market_order
Quantity: 1
SL: 1.5% (Relative)
TP: 3% (Relative)
Important Notes
Paper Trading First : Always test with paper trading enabled before live trading
Order Tags : Automatically generated for tracking (max 18 chars)
Position Management : Strategy closes opposite positions automatically
Signal Confirmation : Uses barstate.isconfirmed to prevent repainting
JSON Payload : All settings are converted to JSON and sent via webhook
Troubleshooting
No signals : Check if price is actually touching the bands
Orders not executing : Verify webhook URL and API credentials
Wrong strikes : Double-check Strike Interval for your asset
SL Bollinger Bands Strategy - User Guide
Overview
This is a Mean Reversion strategy using Bollinger Bands. It generates trading signals when price moves outside the bands and then crosses back, or simply crosses the bands depending on the logic. It integrates with Algoticks.in API for automated trading on Delta Exchange.
Strategy Logic
Long Signal: When Price crosses below the Lower Band (Oversold / Dip Buy)
Short Signal: When Price crosses above the Upper Band (Overbought / Top Sell)
Automatically closes opposite positions before entering new ones
Quick Setup
1. Add to TradingView
Open TradingView and go to the chart
Click "Pine Editor" at the bottom
Paste the script code
Click "Add to Chart"
2. Configure Strategy Parameters
Strategy Settings
Length (default: 20): The lookback period for the SMA basis
StdDev (default: 2.0): The number of standard deviations for the bands
General API Settings
Paper Trading : Enable for testing without real money
Signal Type : Choose "Trading Signal" (default) for tracking
Exchange : DELTA (Delta Exchange)
Segment :
futures - Perpetual contracts
options - Call/Put options
spot - Spot trading
Order Settings: Basic
Quantity : Number of contracts (e.g., 1, 0.5, 2)
Validity :
GTC - Good Till Cancelled
IOC - Immediate or Cancel
FOK - Fill or Kill
DAY - Day order
Product : cross_margin or isolated_margin
Order Settings: Entry Type
Choose how orders are executed:
Market Order : Immediate fill at best price
Limit Order : Fill at specified price or better
Stop Market : Triggers at stop price, then market order
Stop Limit : Triggers at stop price, then limit order
Entry Prices (for Limit/Stop orders)
Limit Price:
Price : The value to use
Type : Last Price / Mark Price / Index Price
Mode :
Absolute - Exact price (e.g., 65000)
Relative - Offset from entry price
% Checkbox : If checked, relative uses percentage; if unchecked, uses points
Example:
Absolute: 65000 → Order at exactly 65000
Relative 1% (checked): Entry ± 1% of entry price
Relative 100 (unchecked): Entry ± 100 points
Trigger Price: Same logic as Limit Price, used for Stop orders
Exit / Bracket Prices (SL/TP)
Stop Loss (SL):
Type : Price type to monitor (Mark Price recommended)
Mode : Absolute or Relative
% : Percentage or points
SL : Stop loss value (e.g., 2 for 2%)
Trig : Optional trigger price (creates Stop-Limit SL)
Take Profit (TP): Same structure as SL
Example:
Long entry at 65000, SL = 2% → Exit at 63700 (65000 - 2%)
Short entry at 65000, TP = 3% → Exit at 63050 (65000 - 3%)
3. Options Trading Setup (Only if Segment = Options)
Strike Selection Method
User Defined Mode:
Manually specify exact strike and option type
Best for: Trading specific levels
Required fields:
Strike Price : e.g., "65000"
Option Type : Call or Put
Dynamic Mode:
System calculates strike based on ATM price
Best for: Automated strategies
Required fields:
Algo Type : Options Buying or Selling
Strike Offset : 0 (ATM), +1 (above ATM), -1 (below ATM)
Strike Interval : Gap between strikes (e.g., BTC: 500, ETH: 50)
Expiry Date Formats:
T+0 - Today
T+1 - Tomorrow
current week - This Friday
next week - Next Friday
current month - Last Friday of month
131125 - Specific date (13 Nov 2025)
4. Create Alert for Automation
Right-click on chart → "Add Alert"
Condition : Select your strategy name
Alert Actions : Webhook URL
Webhook URL : Your Algoticks.in API endpoint
Message : Leave as {{strategy.order.alert_message}} (contains JSON)
Click "Create"
The alert will automatically send JSON payloads to your API when signals occur.
Example Configurations
Standard Mean Reversion
Strategy: Length = 20, StdDev = 2.0
Segment: futures
Order Type: market_order
Quantity: 1
SL: 1% (Relative)
TP: 2% (Relative)
Wide Band Reversal
Strategy: Length = 20, StdDev = 2.5
Segment: futures
Order Type: market_order
Quantity: 1
SL: 1.5% (Relative)
TP: 3% (Relative)
Important Notes
Paper Trading First : Always test with paper trading enabled before live trading
Order Tags : Automatically generated for tracking (max 18 chars)
Position Management : Strategy closes opposite positions automatically
Signal Confirmation : Uses barstate.isconfirmed to prevent repainting
JSON Payload : All settings are converted to JSON and sent via webhook
Troubleshooting
No signals : Check if price is actually touching the bands
Orders not executing : Verify webhook URL and API credentials
Wrong strikes : Double-check Strike Interval for your asset
SL
Algoticks.in: Supertrend Strategy (Directional option sample)Supertrend Strategy - User Guide
Overview
This is a trend-following strategy based on the Supertrend indicator. It generates signals when the trend direction changes (Green to Red or Red to Green). It is fully integrated with Algoticks.in API for automated trading on Delta Exchange, with specialized logic for Options trading.
Strategy Logic
Long Signal: When Supertrend flips to Green (Bullish Trend Start)
Short Signal: When Supertrend flips to Red (Bearish Trend Start)
Automatically closes opposite positions before entering new ones
Quick Setup
1. Add to TradingView
Open TradingView and go to the chart
Click "Pine Editor" at the bottom
Paste the script code
Click "Add to Chart"
2. Configure Strategy Parameters
Strategy Settings
ATR Length (default: 10): The lookback period for Average True Range
Factor (default: 3.0): The multiplier for the ATR bands. Higher values = fewer signals (less noise), Lower values = more signals (scalping).
General API Settings
Paper Trading : Enable for testing without real money
Signal Type : Choose "Trading Signal" (default) for tracking
Exchange : DELTA (Delta Exchange)
Segment :
futures - Perpetual contracts
options - Call/Put options
spot - Spot trading
Order Settings: Basic
Quantity : Number of contracts (e.g., 1, 0.5, 2)
Validity :
GTC - Good Till Cancelled
IOC - Immediate or Cancel
FOK - Fill or Kill
DAY - Day order
Product : cross_margin or isolated_margin
Order Settings: Entry Type
Choose how orders are executed:
Market Order : Immediate fill at best price
Limit Order : Fill at specified price or better
Stop Market : Triggers at stop price, then market order
Stop Limit : Triggers at stop price, then limit order
Entry Prices (for Limit/Stop orders)
Limit Price:
Price : The value to use
Type : Last Price / Mark Price / Index Price
Mode :
Absolute - Exact price (e.g., 65000)
Relative - Offset from entry price
% Checkbox : If checked, relative uses percentage; if unchecked, uses points
Example:
Absolute: 65000 → Order at exactly 65000
Relative 1% (checked): Entry ± 1% of entry price
Relative 100 (unchecked): Entry ± 100 points
Trigger Price: Same logic as Limit Price, used for Stop orders
Exit / Bracket Prices (SL/TP)
Stop Loss (SL):
Type : Price type to monitor (Mark Price recommended)
Mode : Absolute or Relative
% : Percentage or points
SL : Stop loss value (e.g., 2 for 2%)
Trig : Optional trigger price (creates Stop-Limit SL)
Take Profit (TP): Same structure as SL
Example:
Long entry at 65000, SL = 2% → Exit at 63700 (65000 - 2%)
Short entry at 65000, TP = 3% → Exit at 63050 (65000 - 3%)
3. Options Trading Setup (CRITICAL)
This strategy has special logic for Options trading to handle directional bias correctly.
Scenario A: Options Buying (Long Volatility)
You want to BUY Calls when the trend is Up, and BUY Puts when the trend is Down.
Segment : options
Strike Selection : Dynamic
Algo Type : Options Buying Algo
What happens:
Long Signal (Green Supertrend) → System sends BUY action. Backend buys a Call (CE) .
Short Signal (Red Supertrend) → System sends BUY action. Backend buys a Put (PE) .
Scenario B: Options Selling (Short Volatility)
You want to SELL Puts when the trend is Up (Bullish), and SELL Calls when the trend is Down (Bearish).
Segment : options
Strike Selection : Dynamic
Algo Type : Options Selling Algo
What happens:
Long Signal (Green Supertrend) → System sends SELL action. Backend sells a Put (PE) .
Short Signal (Red Supertrend) → System sends SELL action. Backend sells a Call (CE) .
Dynamic Strike Settings:
Strike Offset : 0 (ATM), +1 (OTM for Calls/ITM for Puts), -1 (ITM for Calls/OTM for Puts)
Strike Interval : Gap between strikes (e.g., BTC: 500, ETH: 50)
Expiry Date Formats:
T+0 - Today
T+1 - Tomorrow
current week - This Friday
next week - Next Friday
current month - Last Friday of month
131125 - Specific date (13 Nov 2025)
4. Create Alert for Automation
Right-click on chart → "Add Alert"
Condition : Select your strategy name
Alert Actions : Webhook URL
Webhook URL : Your Algoticks.in API endpoint
Message : Leave as {{strategy.order.alert_message}} (contains JSON)
Click "Create"
The alert will automatically send JSON payloads to your API when signals occur.
Example Configurations
Futures Trend Following
Strategy: ATR=10, Factor=3.0
Segment: futures
Order Type: market_order
Quantity: 1
SL: 2% (Relative)
TP: 6% (Relative)
Options Buying (Directional)
Segment: options
Strike Selection: Dynamic
Algo Type: Options Buying Algo
Strike Offset: 0 (ATM)
Strike Interval: 500 (for BTC)
Expiry: current week
Order Type: market_order
Important Notes
Paper Trading First : Always test with paper trading enabled before live trading
Order Tags : Automatically generated for tracking (max 18 chars)
Position Management : Strategy closes opposite positions automatically
Signal Confirmation : Uses barstate.isconfirmed to prevent repainting
JSON Payload : All settings are converted to JSON and sent via webhook
Troubleshooting
No signals : Check if Supertrend is flipping on your timeframe
Orders not executing : Verify webhook URL and API credentials
Wrong strikes : Double-check Strike Interval for your asset
SL/TP not working : Ensure values are non-zero and mode is correct
Support
For API setup and connector configuration, see visit Algoticks.in documentation.
Algoticks.in: RSI StrategyRSI Strategy - User Guide
Overview
This is a Relative Strength Index (RSI) strategy that generates trading signals based on overbought and oversold levels. It integrates with Algoticks.in API for automated trading on Delta Exchange.
Strategy Logic
Long Signal: When RSI crosses above the Oversold level (Mean Reversion / Dip Buy)
Short Signal: When RSI crosses below the Overbought level (Mean Reversion / Top Sell)
Automatically closes opposite positions before entering new ones
Quick Setup
1. Add to TradingView
Open TradingView and go to the chart
Click "Pine Editor" at the bottom
Paste the script code
Click "Add to Chart"
2. Configure Strategy Parameters
Strategy Settings
RSI Length (default: 14): The lookback period for RSI calculation
Overbought Level (default: 70): Level above which the asset is considered overbought
Oversold Level (default: 30): Level below which the asset is considered oversold
General API Settings
Paper Trading : Enable for testing without real money
Signal Type : Choose "Trading Signal" (default) for tracking
Exchange : DELTA (Delta Exchange)
Segment :
futures - Perpetual contracts
options - Call/Put options
spot - Spot trading
Order Settings: Basic
Quantity : Number of contracts (e.g., 1, 0.5, 2)
Validity :
GTC - Good Till Cancelled
IOC - Immediate or Cancel
FOK - Fill or Kill
DAY - Day order
Product : cross_margin or isolated_margin
Order Settings: Entry Type
Choose how orders are executed:
Market Order : Immediate fill at best price
Limit Order : Fill at specified price or better
Stop Market : Triggers at stop price, then market order
Stop Limit : Triggers at stop price, then limit order
Entry Prices (for Limit/Stop orders)
Limit Price:
Price : The value to use
Type : Last Price / Mark Price / Index Price
Mode :
Absolute - Exact price (e.g., 65000)
Relative - Offset from entry price
% Checkbox : If checked, relative uses percentage; if unchecked, uses points
Example:
Absolute: 65000 → Order at exactly 65000
Relative 1% (checked): Entry ± 1% of entry price
Relative 100 (unchecked): Entry ± 100 points
Trigger Price: Same logic as Limit Price, used for Stop orders
Exit / Bracket Prices (SL/TP)
Stop Loss (SL):
Type : Price type to monitor (Mark Price recommended)
Mode : Absolute or Relative
% : Percentage or points
SL : Stop loss value (e.g., 2 for 2%)
Trig : Optional trigger price (creates Stop-Limit SL)
Take Profit (TP): Same structure as SL
Example:
Long entry at 65000, SL = 2% → Exit at 63700 (65000 - 2%)
Short entry at 65000, TP = 3% → Exit at 63050 (65000 - 3%)
3. Options Trading Setup (Only if Segment = Options)
Strike Selection Method
User Defined Mode:
Manually specify exact strike and option type
Best for: Trading specific levels
Required fields:
Strike Price : e.g., "65000"
Option Type : Call or Put
Dynamic Mode:
System calculates strike based on ATM price
Best for: Automated strategies
Required fields:
Algo Type : Options Buying or Selling
Strike Offset : 0 (ATM), +1 (above ATM), -1 (below ATM)
Strike Interval : Gap between strikes (e.g., BTC: 500, ETH: 50)
Expiry Date Formats:
T+0 - Today
T+1 - Tomorrow
current week - This Friday
next week - Next Friday
current month - Last Friday of month
131125 - Specific date (13 Nov 2025)
4. Create Alert for Automation
Right-click on chart → "Add Alert"
Condition : Select your strategy name
Alert Actions : Webhook URL
Webhook URL : Your Algoticks.in API endpoint
Message : Leave as {{strategy.order.alert_message}} (contains JSON)
Click "Create"
The alert will automatically send JSON payloads to your API when signals occur.
Example Configurations
Standard RSI Reversal
Strategy: RSI Length = 14, OB = 70, OS = 30
Segment: futures
Order Type: market_order
Quantity: 1
SL: 1.5% (Relative)
TP: 3% (Relative)
Aggressive Scalping
Strategy: RSI Length = 7, OB = 80, OS = 20
Segment: futures
Order Type: market_order
Quantity: 0.5
SL: 0.5% (Relative)
TP: 1% (Relative)
Important Notes
Paper Trading First : Always test with paper trading enabled before live trading
Order Tags : Automatically generated for tracking (max 18 chars)
Position Management : Strategy closes opposite positions automatically
Signal Confirmation : Uses barstate.isconfirmed to prevent repainting
JSON Payload : All settings are converted to JSON and sent via webhook
Troubleshooting
No signals : Check if RSI is actually reaching your OB/OS levels
Orders not executing : Verify webhook URL and API credentials
Wrong strikes : Double-check Strike Interval for your asset
SL/TP not working : Ensure values are non-zero and mode is correct
Support
For API setup and connector configuration, visit Algoticks.in documentation.
YM Ultimate SNIPER v7# YM Ultimate SNIPER v7 - Documentation & Trading Guide
## 🎯 INTRABAR EDITION | Order Blocks + Liquidity Sweeps + IFVG + INTRABAR ANALYSIS
**TARGET: 3-7 High-Confluence Trades per Day**
**Philosophy: "Zones That Matter" + "See Inside The Candle"**
---
## ⚡ WHAT'S NEW IN v7
### Major Additions: INTRABAR ANALYSIS ENGINE
| Feature | Description | Edge It Provides |
|---------|-------------|------------------|
| **Intrabar Delta** | REAL buy/sell pressure from lower TF | Far more accurate than estimated delta |
| **Intrabar Momentum** | Direction consistency within bar | See if candle formed through conviction |
| **Absorption Detection** | High vol + low price movement | Spot institutional accumulation/distribution |
| **Internal Sweeps** | Stop hunts INSIDE candles | Catch hidden liquidity grabs |
| **Volume Distribution** | Where volume clustered in bar | TOP/MID/BOT volume clustering |
### The Intrabar Advantage
**Problem with Standard Analysis:**
- You only see the final OHLC of each candle
- Delta estimation is educated guesswork
- Internal price action is invisible
- Stop hunts inside bars go undetected
**Solution with Intrabar Analysis:**
- `request.security_lower_tf()` gives us the INSIDE view
- See actual lower timeframe candles within each bar
- Calculate TRUE delta from actual price direction
- Detect sweeps and reversals hidden from current timeframe
---
## 🔬 INTRABAR ANALYSIS DEEP DIVE
### How It Works
When you're on a 5-minute chart, intrabar analysis requests 1-minute data within each 5-minute bar. This gives us 5 sub-candles to analyze within each parent candle.
```
5-MIN CANDLE (What you normally see):
┌────────────────────────────────┐
│ │
│ OPEN ──────── CLOSE │
│ │
└────────────────────────────────┘
INTRABAR VIEW (What v7 sees):
┌────────────────────────────────┐
│ 🕐1 🕐2 🕐3 🕐4 🕐5 │
│ ▲ ▼ ▲ ▲ ▲ │
│ │ │ │ │ │ │
│ Each 1-min candle analyzed │
└────────────────────────────────┘
```
### Intrabar Delta (IB Delta)
**What It Is:**
Real buy/sell pressure calculated from actual lower timeframe candle directions.
**Why It's Better:**
- Standard delta: Estimated from close position within bar
- Intrabar delta: Calculated from 5+ actual candles with known direction
**Calculation:**
```
For each intrabar candle:
├── If bullish (close > open): More weight to buy volume
├── If bearish (close < open): More weight to sell volume
├── Volume distributed by close position within each micro-candle
└── Summed across all intrabar candles = TRUE DELTA
```
**Grades:**
| IB Delta % | Grade | Meaning |
|------------|-------|---------|
| 78%+ | 🔥 EXTREME | One side has overwhelming control |
| 70-77% | ✓✓ STRONG | Clear directional bias |
| 62-69% | ✓ DOMINANT | Healthy dominance |
| <62% | — NEUTRAL | Mixed/uncertain |
---
### Intrabar Momentum (IB Momentum)
**What It Is:**
The percentage of intrabar candles moving in the same direction.
**Why It Matters:**
A bullish candle could form through:
1. **High momentum:** 4 of 5 sub-candles bullish = Strong conviction
2. **Low momentum:** 2 bullish, 2 bearish, 1 bullish = Choppy formation
**Calculation:**
```
IB Momentum = max(bullish_count, bearish_count) / total_intrabar_candles
Example (5-min bar with 1-min intrabar):
├── 1st minute: Bullish ✓
├── 2nd minute: Bullish ✓
├── 3rd minute: Bearish ✗
├── 4th minute: Bullish ✓
├── 5th minute: Bullish ✓
└── IB Momentum = 4/5 = 80% BULLISH
```
**Thresholds:**
| IB Momentum % | Classification | Signal Quality |
|---------------|----------------|----------------|
| 75%+ | 🔥 STRONG | Very high conviction |
| 60-74% | ✓ CONFIRMED | Good directional bias |
| <60% | MIXED | Choppy, low conviction |
---
### Absorption Detection
**What It Is:**
Institutional accumulation/distribution signature - high volume with little price movement.
**The Theory:**
When institutions accumulate (buy), they absorb selling without moving price much:
- Retail sells → Institution buys at limit prices
- Volume spikes but price stays flat
- Once accumulation complete → price explodes up
**Detection Logic:**
```
ABSORPTION = High Volume + Low Price Movement + Volume Clustering
Conditions:
├── Volume per point > 1.5x average
├── Price movement < 60% of average range
├── Volume clusters in one zone (TOP/MID/BOT)
└── Cluster percentage >= 65% threshold
```
**Direction:**
- **BULL ABS:** Volume clustered at BOT + net buy delta = Buying at lows
- **BEAR ABS:** Volume clustered at TOP + net sell delta = Selling at highs
**Visual:** ✕ marker below (bull) or above (bear) the candle
---
### Internal Sweeps (Hidden Liquidity Grabs)
**What It Is:**
Stop hunts that happen INSIDE a candle - invisible on current timeframe.
**The Setup:**
```
INTERNAL BULLISH SWEEP:
┌─────────────────────────────────┐
│ │
│ First Half: Second Half: │
│ ▲▼▲▼ ▲▲▲ │
│ Forms lows Reverses UP │
│ ↓ ↑ │
│ SWEEP REJECTION │
└─────────────────────────────────┘
= Hidden liquidity grab at lows, bullish
```
**Detection:**
```
Internal Bull Sweep:
├── Early intrabar candles form a low
├── Later intrabar candles sweep below that low
├── Final intrabar candles close back above
├── Parent candle closes green
└── = Hidden sweep, bullish reversal
Internal Bear Sweep:
├── Early intrabar candles form a high
├── Later intrabar candles sweep above that high
├── Final intrabar candles close back below
├── Parent candle closes red
└── = Hidden sweep, bearish reversal
```
**Visual:** "iS" marker (intrabar Sweep) on the candle
---
### Volume Distribution
**What It Is:**
Where volume clustered within the parent candle - TOP, MID, or BOT third.
**Why It Matters:**
- **BOT clustering + bullish delta:** Institutions buying at lows (bullish)
- **TOP clustering + bearish delta:** Institutions selling at highs (bearish)
- **MID clustering:** Balanced/uncertain
**Calculation:**
```
Divide parent candle into 3 zones:
├── TOP third: high - (range/3)
├── MID third: middle zone
└── BOT third: low + (range/3)
For each intrabar candle:
├── Calculate midpoint
├── Assign volume to TOP/MID/BOT based on midpoint
└── Sum volumes by zone
```
---
## 📊 ENHANCED CONFLUENCE SCORING v7
### Score Components (Max ~14, normalized to 10)
| Factor | Points | Condition |
|--------|--------|-----------|
| **Tier** | 1-3 | B=1, A=2, S=3 |
| **FVG Zone** | +1.5 | Price in quality FVG |
| **Order Block** | +1.5 | Price in OB |
| **IFVG** | +1.0 | Price in Inverse FVG |
| **Strong Volume** | +1.0 | Volume ≥ 2x average |
| **Extreme Volume** | +0.5 | Volume ≥ 2.5x average |
| **Strong Delta** | +1.0 | Delta ≥ 70% |
| **Extreme Delta** | +0.5 | Delta ≥ 78% |
| **CVD Momentum** | +0.5-1.0 | CVD trending with signal |
| **Liquidity Sweep** | +1.5 | Recent sweep confirms direction |
| **IB Delta Confirm** | +0.9-1.5 | Intrabar delta matches direction |
| **IB Momentum** | +0.5-1.0 | Consistent intrabar direction |
| **IB Absorption** | +1.0 | Absorption detected matching direction |
| **IB Internal Sweep** | +1.0 | Hidden sweep confirms direction |
| **Volume Cluster** | +0.5 | Volume at favorable zone (BOT for bull) |
### Intrabar Confluence Breakdown
```
INTRABAR CONFLUENCE ADDITIONS:
IB Delta Confirmation:
├── Strong (70%+) + matching direction = +1.5 pts
├── Dominant (62%+) + matching direction = +0.9 pts
└── Not matching = +0 pts
IB Momentum:
├── Strong (75%+) + matching direction = +1.0 pts
├── Confirmed (60%+) + matching direction = +0.5 pts
└── Mixed/not matching = +0 pts
IB Absorption:
├── Bull absorption for LONG = +1.0 pts
├── Bear absorption for SHORT = +1.0 pts
└── No absorption or wrong direction = +0 pts
IB Internal Sweep:
├── Bull internal sweep for LONG = +1.0 pts
├── Bear internal sweep for SHORT = +1.0 pts
└── No internal sweep = +0 pts
Volume Cluster:
├── BOT cluster for LONG = +0.5 pts
├── TOP cluster for SHORT = +0.5 pts
└── MID cluster or wrong zone = +0 pts
```
---
## 🎯 IDEAL SETUPS v7 (HIGHEST WIN RATE)
### Setup 1: Absorption + Zone + Tier (NEW!)
```
Conditions:
├── Absorption detected (✕ marker)
├── Price at Order Block or FVG
├── Tier signal fires (S/A/B)
├── IB Delta confirms direction
├── Score: 8+ EXCELLENT
└── Win Rate: ~80-88%
WHY IT WORKS:
Absorption = institutions filling orders
Zone = known institutional level
Tier = significant move
= Triple institutional confirmation
```
### Setup 2: Internal Sweep + Zone
```
Conditions:
├── Internal sweep detected (iS marker)
├── At or near OB/FVG zone
├── IB momentum confirms (75%+)
├── Score: 7+ EXCELLENT
└── Win Rate: ~75-85%
WHY IT WORKS:
Hidden sweep = invisible stop hunt
Zone = where institutions defend
= Retail trapped, you enter with smart money
```
### Setup 3: Full Intrabar Alignment
```
Conditions:
├── IB Delta: Strong/Extreme (✓✓ or 🔥)
├── IB Momentum: Strong (🔥)
├── Volume Cluster: Favorable zone
├── Standard delta confirms
├── Score: 7+ EXCELLENT
└── Win Rate: ~75-82%
WHY IT WORKS:
All intrabar metrics align
= Maximum conviction in candle formation
= High probability continuation
```
### Setup 4: Standard v6 Setup (Still Valid)
```
Conditions:
├── Liquidity Sweep (LS↑ or LS↓)
├── Price at Order Block or FVG
├── Tier signal fires
├── Score: 7+ EXCELLENT
└── Win Rate: ~75-85%
```
---
## 📊 ENHANCED TABLE REFERENCE v7
The v7 table adds the **INTRABAR** section:
### CANDLE Section
| Row | What It Shows |
|-----|---------------|
| Points | Candle range in points + Tier (S/A/B/X) |
| Volume | Volume ratio + grade |
### ORDERFLOW Section
| Row | What It Shows |
|-----|---------------|
| Delta | Buy/Sell % + grade (now uses IB delta if available) |
| CVD | Direction + strength |
### INTRABAR Section (NEW!)
| Row | What It Shows |
|-----|---------------|
| IB Delta | TRUE intrabar buy/sell % + grade |
| IB Momentum | Direction consistency % + grade |
| Absorption | BULL ABS / BEAR ABS / — + 🎯 indicator |
### STRUCTURE Section
| Row | What It Shows |
|-----|---------------|
| FVG Zone | Current zone + quality score |
| Order Block | OB status |
| Liq Sweep | External LS↑/↓ or internal iS↑/↓ + indicator |
### SIGNAL Section
| Row | What It Shows |
|-----|---------------|
| Session | Current session + active indicator |
| SCORE | Numeric score /10 + classification |
---
## 🔧 INTRABAR SETTINGS GUIDE
### Intrabar Timeframe Selection
| Chart TF | Recommended Intrabar TF | Sub-candles |
|----------|------------------------|-------------|
| 1 min | 1 (same) | Limited data |
| 3 min | 1 | 3 candles |
| 5 min | 1 | 5 candles |
| 15 min | 1 or 5 | 15 or 3 candles |
| 30 min | 5 | 6 candles |
| 1 hour | 5 or 15 | 12 or 4 candles |
**Rule of Thumb:** Lower intrabar TF = more data = more accurate
### Parameter Tuning
**Absorption Threshold (Default: 65%)**
```
Lower (50-60%): More absorption signals, some false positives
Standard (65%): Balanced detection
Higher (70-80%): Fewer signals, higher quality
```
**Intrabar Momentum Min (Default: 60%)**
```
Lower (50-55%): Accepts mixed candles as directional
Standard (60%): Requires clear majority
Higher (70-80%): Requires strong conviction
```
**Intrabar Delta Weight (Default: 1.5)**
```
Lower (0.5-1.0): Intrabar delta contributes less to score
Standard (1.5): Full contribution
Higher (2.0-3.0): Intrabar delta heavily weighted
```
---
## ✅ ENTRY CHECKLIST v7
### Basic Requirements
- Signal present (S🎯/A🎯/B🎯 or Z)
- Score ≥ 4.5 (MEDIUM or better)
- Session active (🟢)
### Orderflow Confirmation
- Delta colored (not gray)
- CVD arrow matches direction
- Volume shows ✓ or better
### Intrabar Confirmation (NEW!)
- IB Delta matches direction (✓ or better)
- IB Momentum shows direction or strong (🔥)
- No conflicting absorption signal
### Structure Bonus
- In FVG Zone
- In Order Block
- Recent Liquidity Sweep
- Internal Sweep (iS)
- Absorption detected
- IFVG present
---
## 🚨 NEW ALERTS v7
### Intrabar-Specific Alerts
| Alert | What It Means | Priority |
|-------|---------------|----------|
| ⚡ INTRABAR BULL SWEEP | Hidden sweep lows inside candle | 🟠 HIGH |
| ⚡ INTRABAR BEAR SWEEP | Hidden sweep highs inside candle | 🟠 HIGH |
| 🎯 BULL ABSORPTION | Institutions accumulating | 🟠 HIGH |
| 🎯 BEAR ABSORPTION | Institutions distributing | 🟠 HIGH |
### Alert Priority Guide
| Alert | Priority | Action |
|-------|----------|--------|
| ⭐ EXCELLENT + ABSORPTION | 🔴 CRITICAL | Top-tier, enter immediately |
| ⭐ EXCELLENT LONG/SHORT | 🔴 CRITICAL | Check NOW |
| 🎯 ABSORPTION | 🟠 HIGH | Check for zone confluence |
| ⚡ INTRABAR SWEEP | 🟠 HIGH | Hidden opportunity |
| 🎯 S-TIER | 🟠 HIGH | Evaluate quickly |
---
## ⛔ DO NOT TRADE v7
All previous rules PLUS:
- IB Delta strongly conflicts with signal direction
- IB Momentum shows opposite direction at 75%+
- Absorption detected in OPPOSITE direction
- Score inflated only by intrabar (no structure)
- Intrabar data unavailable (empty array)
---
## 📝 TECHNICAL NOTES v7
### Compatibility
- **Pine Script v6** (required for `request.security_lower_tf()`)
- **Works on**: YM, MYM, NQ, MNQ, ES, MES, GC, MGC, BTC
- **Chart Type**: Standard candlestick (not Renko/Heikin Ashi)
- **Timeframes**: 1-minute to 4-hour recommended
- **Tick Charts**: Use 1-minute intrabar TF
### Performance Notes
- Intrabar analysis adds computational overhead
- If chart loads slowly, try higher intrabar TF
- `request.security_lower_tf()` returns array of data
- Empty arrays indicate no lower TF data available
### Timeframe Limitations
```
request.security_lower_tf() works when:
├── Intrabar TF < Chart TF (e.g., 1 min intrabar on 5 min chart)
└── Chart receives enough data from lower TF
Does NOT work when:
├── Intrabar TF >= Chart TF
├── Tick charts with minute intrabar (use seconds or same)
└── Very old historical data
```
---
## 📈 TRADE JOURNAL v7
```
DATE: ___________
SESSION: ☐ LDN ☐ NY ☐ PWR
SETUP TYPE:
☐ Absorption + Zone ☐ Internal Sweep ☐ Full IB Align
☐ Sweep + Zone ☐ IFVG ☐ OB+FVG ☐ Zone Entry
TRADE:
├── Time: _______
├── Signal: S🎯 / A🎯 / B🎯 / Z / LS / iS
├── Direction: LONG / SHORT
├── Score: ___/10 (EXCELLENT / MEDIUM)
├── Entry: _______
├── Stop: _______
├── Target: _______
│
├── In FVG Zone: ☐ Yes ☐ No
├── In Order Block: ☐ Yes ☐ No
├── Liquidity Sweep: ☐ Yes ☐ No
├── Internal Sweep: ☐ Yes ☐ No
├── Absorption: ☐ Yes ☐ No
├── IFVG Present: ☐ Yes ☐ No
│
├── IB Delta: _____% (BULL / BEAR)
├── IB Momentum: _____% (BULL / BEAR / MIXED)
├── Volume Cluster: TOP / MID / BOT
│
├── Result: +/- ___ pts ($_____)
└── Notes: _______________________
DAILY SUMMARY:
├── Trades: ___
├── EXCELLENT setups: ___
├── With Absorption: ___
├── With Internal Sweep: ___
├── Wins: ___ | Losses: ___
├── Net P/L: $_____
└── Best setup type: _______________________
```
---
## 🏆 GOLDEN RULES v7
> **"Intrabar shows the truth the candle hides."**
> **"Absorption = They're loading. Get ready."**
> **"Internal sweep = Hidden trap. Enter after."**
> **"IB Delta + IB Momentum aligned = Maximum conviction."**
> **"When intrabar conflicts with signal, trust intrabar."**
> **"Volume at lows + buying = Institutions accumulating."**
> **"Confluence beats conviction. Stack the factors."**
> **"Leave every trade with money. The next setup is coming."**
---
## 🔧 TROUBLESHOOTING v7
| Issue | Solution |
|-------|----------|
| No intrabar data | Lower your chart TF or raise intrabar TF |
| IB Delta always neutral | Check intrabar TF is lower than chart TF |
| Too many absorption signals | Raise absorption threshold to 70%+ |
| Missing internal sweeps | More common on volatile markets |
| Slow chart loading | Use higher intrabar TF (5 instead of 1) |
| IB section not in table | Enable "Show Intrabar Metrics" |
| Conflicting signals | Trust intrabar data over standard delta |
---
## 📚 QUICK REFERENCE CARD
```
┌─────────────────────────────────────────────────────────────────────────┐
│ YM ULTIMATE SNIPER v7 │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ SIGNALS: │
│ S🎯 = S-Tier (50+ pts) → HOLD position │
│ A🎯 = A-Tier (25-49 pts) → SWING trade │
│ B🎯 = B-Tier (12-24 pts) → SCALP quick │
│ Z = Zone entry │
│ LS↑/↓ = External Liquidity Sweep │
│ iS↑/↓ = Internal (intrabar) Sweep │
│ ✕ = Absorption detected │
│ │
│ INTRABAR METRICS: │
│ IB Delta = TRUE buy/sell from lower TF │
│ IB Momentum = Direction consistency within bar │
│ Absorption = High vol + low move = accumulation │
│ Vol Cluster = TOP/MID/BOT volume distribution │
│ │
│ INTRABAR GRADES: │
│ 🔥 = Extreme (78%+ delta or 75%+ momentum) │
│ ✓✓ = Strong (70%+ delta) │
│ ✓ = Confirmed (62%+ delta or 60%+ momentum) │
│ — = Neutral / Mixed │
│ │
│ HIGH PROBABILITY SETUPS: │
│ 1. Absorption + Zone + Tier (~80-88%) │
│ 2. Internal Sweep + Zone (~75-85%) │
│ 3. Full Intrabar Alignment (~75-82%) │
│ 4. Standard Sweep + Zone (~75-85%) │
│ │
│ SCORE CLASSIFICATION: │
│ EXCELLENT (7.0+) = Full size, high confidence │
│ MEDIUM (4.5-6.9) = Standard size, good setup │
│ WEAK (<4.5) = No signal shown │
│ │
└─────────────────────────────────────────────────────────────────────────┘
```
---
*© Alexandro Disla - YM Ultimate SNIPER v7*
*Intrabar Edition | See Inside The Candle*
Linear Trajectory & Volume StructureThe Linear Trajectory & Volume Structure indicator is a comprehensive trend-following system designed to identify market direction, volatility-adjusted channels, and high-probability entry points. Unlike standard Moving Averages, this tool utilizes Linear Regression logic to calculate the "best fit" trajectory of price, encased within volatility bands (ATR) to filter out market noise.
It integrates three core analytical components into a single interface:
Trend Engine: A Linear Regression Curve to determine the mean trajectory.
Volume Verification: Filters signals to ensure price movement is backed by market participation.
Market Structure: Identifies previous high-volume supply and demand zones for support and resistance analysis.
2. Core Components and Logic
The Trajectory Engine
The backbone of the system is a Linear Regression calculation. This statistical method fits a straight line through recent price data points to determine the current slope and direction.
The Baseline: Represents the "fair value" or mean trajectory of the asset.
The Cloud: Calculated using Average True Range (ATR). It expands during high volatility and contracts during consolidation.
Trend Definition:
Bullish: Price breaks above the Upper Deviation Band.
Bearish: Price breaks below the Lower Deviation Band.
Neutral/Chop: Price remains inside the cloud.
Smart Volume Filter
The indicator includes a toggleable volume filter. When enabled, the script calculates a Simple Moving Average (SMA) of the volume.
High Volume: Current volume is greater than the Volume SMA.
Signal Validation: Reversal signals and structure zones are only generated if High Volume is present, reducing the likelihood of trading false breakouts on low liquidity.
Volume Structure (Smart Liquidity)
The script automatically plots Support (Demand) and Resistance (Supply) boxes based on pivot points.
Creation: A box is drawn only if a pivot high or low is formed with High Volume (if the volume filter is active).
Mitigation: The boxes extend to the right. If price breaks through a zone, the box turns gray to indicate the level has been breached.
3. Signal Guide
Trend Reversals (Buy/Sell Labels)
These are the primary signals indicating a potential change in the macro trend.
BUY Signal: Appears when price closes above the upper volatility band after previously being in a downtrend.
SELL Signal: Appears when price closes below the lower volatility band after previously being in an uptrend.
Pullbacks (Small Circles)
These are continuation signals, useful for adding to positions or entering an existing trend.
Long Pullback: The trend is Bullish, but price dips momentarily below the baseline (into the "discount" area) and closes back above it.
Short Pullback: The trend is Bearish, but price rallies momentarily above the baseline (into the "premium" area) and closes back below it.
4. Configuration and Settings
Trend Engine Settings
Trajectory Length: The lookback period for the Linear Regression. This is the most critical setting for tuning sensitivity.
Channel Multiplier: Controls the width of the cloud.
1.0: Aggressive. Results in narrower bands and earlier signals, but more false positives.
1.5: Balanced (Default).
2.0+: Conservative. Creates a wide channel, filtering out significant noise but delaying entry signals.
Signal Logic
Show Trend Reversals: Toggles the main Buy/Sell labels.
Show Pullbacks: Toggles the re-entry circle signals.
Smart Volume Filter: If checked, signals require above-average volume. Unchecking this yields more signals but removes the volume confirmation requirement.
Volume Structure
Show Smart Liquidity: Toggles the Support/Resistance boxes.
Structure Lookback: Defines how many bars constitute a pivot. Higher numbers identify only major market structures.
Max Active Zones: Limits the number of boxes on the chart to prevent clutter.
5. Timeframe Optimization Guide
To maximize the effectiveness of the Linear Trajectory, you must adjust the Trajectory Length input based on your trading style and timeframe.
Scalping (1-Minute to 5-Minute Charts)
Recommended Length: 20 to 30
Multiplier: 1.2 to 1.5
Logic: Fast-moving markets require a shorter lookback to react quickly to micro-trend changes.
Day Trading (15-Minute to 1-Hour Charts)
Recommended Length: 55 (Default)
Multiplier: 1.5
Logic: A balance between responsiveness and noise filtering. The default setting of 55 is standard for identifying intraday sessions.
Swing Trading (4-Hour to Daily Charts)
Recommended Length: 89 to 100
Multiplier: 1.8 to 2.0
Logic: Swing trading requires filtering out intraday noise. A longer length ensures you stay in the trade during minor retracements.
6. Dashboard (HUD) Interpretation
The Head-Up Display (HUD) provides a summary of the current market state without needing to analyze the chart visually.
Bias: Displays the current trend direction (BULLISH or BEARISH).
Momentum:
ACCELERATING: Price is moving away from the baseline (strong trend).
WEAKENING: Price is compressing toward the baseline (potential consolidation or reversal).
Volume: Indicates if the current candle's volume is HIGH or LOW relative to the average.
Disclaimer
*Trading cryptocurrencies, stocks, forex, and other financial instruments involves a high level of risk and may not be suitable for all investors. This indicator is a technical analysis tool provided for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a guarantee of profit. Past performance of any trading system or methodology is not necessarily indicative of future results.
PDH/PDL Sweep & Rejection - sudoPDH/PDL Sweep + Rejection
This indicator identifies classic liquidity sweeps of the previous day's high or low, then confirms whether price rejected that level with force. It is built to highlight moments when the market takes liquidity and immediately snaps back in the opposite direction, a behavior often linked to failed breakouts, engineered stops, or clean reversals. The tool marks these events directly on the chart so you can see them without manually watching the daily levels.
What it detects
The indicator focuses on two events:
PDH sweep and rejection
Price breaks above the previous day's high, overshoots the level by a meaningful amount, and then closes back below the high.
PDL sweep and rejection
Price breaks below the previous day's low, overshoots, and then closes back above the low.
These are structural liquidity events, not random wicks. The script checks for enough overshoot and strong bar range to confirm it was a genuine stop grab rather than noise.
How it works
The indicator evaluates each bar using the following logic:
1. Previous day levels
It pulls yesterday's high and low directly from the daily timeframe. These act as the PDH and PDL reference points for intraday trading.
2. Overshoot measurement
After breaking the level, price must push far enough beyond it to qualify as a sweep. Instead of using arbitrary pips, the required overshoot is scaled relative to ATR. This keeps the logic stable across different assets and volatility conditions.
3. Range confirmation
The bar must be larger than normal compared to ATR. This ensures the sweep happened with momentum and not because of small, choppy price movement.
4. Rejection close
A valid signal only prints if price closes back inside the previous day's range.
For a PDH sweep, the bar must close below PDH.
For a PDL sweep, the bar must close above PDL.
This confirms a failed breakout and a rejection.
What gets placed on the chart
Red downward triangle above the bar: Previous Day High sweep and rejection
Lime upward triangle below the bar: Previous Day Low sweep and rejection
The markers appear exactly on the bar where the sweep and rejection occurred.
How traders can use this
Identify potential reversals
Sweeps often occur when algorithms target liquidity pools. When followed by a strong rejection, the market may be preparing for a reversal or rotation.
Avoid chasing breakouts
A clear sweep warns that a breakout attempt failed. This can prevent traders from entering at the worst possible location.
Time entries at extremes
The markers help you see where the market grabbed stops and immediately turned. These areas can become high quality entry zones in both trend continuation and countertrend setups.
Support liquidity based models
The indicator aligns naturally with trading frameworks that consider liquidity, displacement, failed breaks, and microstructure shifts.
Add confidence to confluence-based setups
Combine sweeps with displacement, FVGs, or higher timeframe levels to refine entry timing.
Why this indicator is helpful
It automates a pattern that traders often identify manually. Sweeps are easy to miss in fast markets, and this tool eliminates the need to constantly monitor daily levels. By marking only the events that show overshoot plus rejection plus significant range, it filters out the weak or false signals and leaves only meaningful liquidity events.
1.1 SMF LONG: Sweep → BOS → OB → BOS break SMF LONG Strategy (Sweep → BOS → Order Block → BOS) — Summary
The strategy looks for a moment when the market takes liquidity to the downside through a sweep (breaking previous lows), followed by the formation of the first BOS, indicating that sellers have lost control. After that, the strategy waits for the creation of an Order Block (OB) — the last bearish candle before the upward impulse — which highlights the zone where large players entered positions. When price returns to the OB, the entry (TVH) is placed at the top of the OB, the stop-loss at the bottom of the OB, and the take-profit is always set to 3× the stop size, regardless of the OB width.
In a one-year backtest from December 2024 to December 2025, the strategy and indicator showed a win rate of 30.85%:
65 stop-losses,
29 take-profits,
and 15 missed trades where the take-profit was hit before price could return to the entry zone.
Hash Pivot DetectorHash Pivot Detector
Professional Support & Resistance Detection with Multi-Timeframe Zone Analysis
Developed by Hash Capital Research, the Hash Pivot Detector is a sophisticated indicator designed for identifying key support and resistance levels using pivot-based detection with institutional-grade zone analysis.
Key Features
Zone-Based Detection
Unlike traditional single-line S/R indicators, Hash Pivot Detector uses configurable zones around pivot levels to represent realistic institutional order areas. Adjustable zone width accommodates different asset volatilities.
Multi-Timeframe Analysis
Displays higher timeframe support/resistance levels alongside current timeframe pivots, providing crucial context for institutional positioning and stronger price barriers.
Clean Visual Design
Features Hash Capital's signature fluorescent color scheme (pink resistance, cyan support) optimized for dark charts with high contrast and instant visual recognition. Semi-transparent zones keep your chart clean and readable.
How It Works
The indicator uses pivot high/low detection with configurable left and right bar parameters. When a pivot is confirmed, it plots:
Primary support/resistance lines at pivot levels
Semi-transparent zones representing realistic order areas
Higher timeframe S/R levels as crosses for additional context
Recommended Settings
For Swing Trading:
Pivot Bars: 10-20 left/right
Zone Width: 0.5-1.0%
HTF: Daily (on 1H-4H charts)
For Intraday Trading:
Pivot Bars: 5-10 left/right
Zone Width: 0.3-0.5%
HTF: 1H or 4H (on 5min-15min charts)
Asset-Specific Zone Width:
Forex/Crypto: 0.3-0.5%
Stocks: 0.5-1.0%
Volatile Assets: 1.0-2.0%
What Makes It Different
✓ Zone-based approach (more realistic than lines)
✓ Multi-timeframe confluence detection
✓ Minimal visual clutter with maximum information
✓ Professional institutional aesthetic
✓ Comprehensive tooltips for easy optimization
✓ No repainting - all pivots are confirmed
Best Used For
Identifying high-probability entry/exit zones
Setting stop-loss and take-profit levels
Recognizing breakout/breakdown areas
Multi-timeframe confluence analysis
Swing trading and position trading
Intraday scalping with adjusted parameters
Notes
Works on all timeframes and markets
Fully customizable colors and parameters
All settings include detailed optimization guidance
Clean code, efficient performance
No alerts or notifications (visual analysis only)
TSD Trend DotsThis script is a modified version of the original “Trend Strength Directional (TSD)” by Trebor_Namor. All core logic, idea, and inspiration come from Trebor_Namor’s work – this version simply adds a clearer alert framework.
TSD combines a wave-based momentum filter with a custom MFI to show the strength and direction of money flow. The “black” wave tracks price momentum, while the MFI color shows whether capital is flowing into (green) or out of (red) the market.
In this edition, the dots are separated into explicit signals:
Green Dot – bullish cross (momentum turning up, potential buy/entry area).
Red Dot – bearish cross (momentum turning down, potential take-profit/exit area).
Separate alertcondition events are provided for Green and Red dots so traders can set individual alerts for long and short bias, while still respecting the original TSD concept. This script is for educational and research purposes only – always combine it with your own analysis and risk management.
Third eye • StrategyThird eye • Strategy – User Guide
1. Idea & Concept
Third eye • Strategy combines three things into one system:
Ichimoku Cloud – to define market regime and support/resistance.
Moving Average (trend filter) – to trade only in the dominant direction.
CCI (Commodity Channel Index) – to generate precise entry signals on momentum breakouts.
The script is a strategy, not an indicator: it can backtest entries, exits, SL, TP and BreakEven logic automatically.
2. Indicators Used
2.1 Ichimoku
Standard Ichimoku settings (by default 9/26/52/26) are used:
Conversion Line (Tenkan-sen)
Base Line (Kijun-sen)
Leading Span A & B (Kumo Cloud)
Lagging Span is calculated but hidden from the chart (for visual simplicity).
From the cloud we derive:
kumoTop – top of the cloud under current price.
kumoBottom – bottom of the cloud under current price.
Flags:
is_above_kumo – price above the cloud.
is_below_kumo – price below the cloud.
is_in_kumo – price inside the cloud.
These conditions are used as trend / regime filters and for stop-loss & trailing stops.
2.2 Moving Average
You can optionally display and use a trend MA:
Types: SMA, EMA, DEMA, WMA
Length: configurable (default 200)
Source: default close
Filter idea:
If MA Direction Filter is ON:
When Close > MA → strategy allows only Long signals.
When Close < MA → strategy allows only Short signals.
The MA is plotted on the chart (if enabled).
2.3 CCI & Panel
The CCI (Commodity Channel Index) is used for entry timing:
CCI length and source are configurable (default length 20, source hlc3).
Two thresholds:
CCI Upper Threshold (Long) – default +100
CCI Lower Threshold (Short) – default –100
Signals:
Long signal:
CCI crosses up through the upper threshold
cci_val < upper_threshold and cci_val > upper_threshold
Short signal:
CCI crosses down through the lower threshold
cci_val > lower_threshold and cci_val < lower_threshold
There is a panel (table) in the bottom-right corner:
Shows current CCI value.
Shows filter status as colored dots:
Green = filter enabled and passed.
Red = filter enabled and blocking trades.
Gray = filter is disabled.
Filters shown in the panel:
Ichimoku Cloud filter (Long/Short)
Ichimoku Lines filter (Conversion/Base vs Cloud)
MA Direction filter
3. Filters & Trade Direction
All filters can be turned ON/OFF independently.
3.1 Ichimoku Cloud Filter
Purpose: trade only when price is clearly above or below the Kumo.
Long Cloud Filter (Use Ichimoku Cloud Filter) – when enabled:
Long trades only if close > cloud top.
Short Cloud Filter – when enabled:
Short trades only if close < cloud bottom.
If the cloud filter is disabled, this condition is ignored.
3.2 Ichimoku Lines Above/Below Cloud
Purpose: stronger trend confirmation: Ichimoku lines should also be on the “correct” side of the cloud.
Long Lines Filter:
Long allowed only if Conversion Line and Base Line are both above the cloud.
Short Lines Filter:
Short allowed only if both lines are below the cloud.
If this filter is OFF, the conditions are not checked.
3.3 MA Direction Filter
As described above:
When ON:
Close > MA → only Longs.
Close < MA → only Shorts.
4. Anti-Re-Entry Logic (Cloud Touch Reset)
The strategy uses internal flags to avoid continuous re-entries in the same direction without a reset.
Two flags:
allowLong
allowShort
After a Long entry, allowLong is set to false, allowShort to true.
After a Short entry, allowShort is set to false, allowLong to true.
Flags are reset when price touches the Kumo:
If Low goes into the cloud → allowLong = true
If High goes into the cloud → allowShort = true
If Close is inside the cloud → both allowLong and allowShort are set to true
There is a key option:
Wait Position Close Before Flag Reset
If ON: cloud touch will reset flags only when there is no open position.
If OFF: flags can be reset even while a trade is open.
This gives a kind of regime-based re-entry control: after a trend leg, you wait for a “cloud interaction” to allow new signals.
5. Risk Management
All risk management is handled inside the strategy.
5.1 Position Sizing
Order Size % of Equity – default 10%
The strategy calculates:
position_value = equity * (Order Size % / 100)
position_qty = position_value / close
So position size automatically adapts to your current equity.
5.2 Take Profit Modes
You can choose one of two TP modes:
Percent
Fibonacci
5.2.1 Percent Mode
Single Take Profit at X% from entry (default 2%).
For Long:
TP = entry_price * (1 + tp_pct / 100)
For Short:
TP = entry_price * (1 - tp_pct / 100)
One strategy.exit per side is used: "Long TP/SL" and "Short TP/SL".
5.2.2 Fibonacci Mode (2 partial TPs)
In this mode, TP levels are based on a virtual Fib-style extension between entry and stop-loss.
Inputs:
Fib TP1 Level (default 1.618)
Fib TP2 Level (default 2.5)
TP1 Share % (Fib) (default 50%)
TP2 share is automatically 100% - TP1 share.
Process for Long:
Compute a reference Stop (see SL section below) → sl_for_fib.
Compute distance: dist = entry_price - sl_for_fib.
TP levels:
TP1 = entry_price + dist * (Fib TP1 Level - 1)
TP2 = entry_price + dist * (Fib TP2 Level - 1)
For Short, the logic is mirrored.
Two exits are used:
TP1 – closes TP1 share % of position.
TP2 – closes remaining TP2 share %.
Same stop is used for both partial exits.
5.3 Stop-Loss Modes
You can choose one of three Stop Loss modes:
Stable – fixed % from entry.
Ichimoku – fixed level derived from the Kumo.
Ichimoku Trailing – dynamic SL following the cloud.
5.3.1 Stable SL
For Long:
SL = entry_price * (1 - Stable SL % / 100)
For Short:
SL = entry_price * (1 + Stable SL % / 100)
Used both for Percent TP mode and as reference for Fib TP if Kumo is not available.
5.3.2 Ichimoku SL (fixed, non-trailing)
At the time of a new trade:
For Long:
Base SL = cloud bottom minus small offset (%)
For Short:
Base SL = cloud top plus small offset (%)
The offset is configurable: Ichimoku SL Offset %.
Once computed, that SL level is fixed for this trade.
5.3.3 Ichimoku Trailing SL
Similar to Ichimoku SL, but recomputed each bar:
For Long:
SL = cloud bottom – offset
For Short:
SL = cloud top + offset
A red trailing SL line is drawn on the chart to visualize current stop level.
This trailing SL is also used as reference for BreakEven and for Fib TP distance.
6. BreakEven Logic (with BE Lines)
BreakEven is optional and supports two modes:
Percent
Fibonacci
Inputs:
Percent mode:
BE Trigger % (from entry) – move SL to BE when price goes this % in profit.
BE Offset % from entry – SL will be set to entry ± this offset.
Fibonacci mode:
BE Fib Level – Fib level at which BE will be activated (default 1.618, same style as TP).
BE Offset % from entry – how far from entry to place BE stop.
The logic:
Before BE is triggered, SL follows its normal mode (Stable/Ichimoku/Ichimoku Trailing).
When BE triggers:
For Long:
New SL = max(current SL, BE SL).
For Short:
New SL = min(current SL, BE SL).
This means BE will never loosen the stop – only tighten it.
When BE is activated, the strategy draws a violet horizontal line at the BreakEven level (once per trade).
BE state is cleared when the position is closed or when a new position is opened.
7. Entry & Exit Logic (Summary)
7.1 Long Entry
Conditions for a Long:
CCI signal:
CCI crosses up through the upper threshold.
Ichimoku Cloud Filter (optional):
If enabled → price must be above the Kumo.
Ichimoku Lines Filter (optional):
If enabled → Conversion Line and Base Line must be above the Kumo.
MA Direction Filter (optional):
If enabled → Close must be above the chosen MA.
Anti-re-entry flag:
allowLong must be true (cloud-based reset).
Position check:
Long entries are allowed when current position size ≤ 0 (so it can also reverse from short to long).
If all these conditions are true, the strategy sends:
strategy.entry("Long", strategy.long, qty = calculated_qty)
After entry:
allowLong = false
allowShort = true
7.2 Short Entry
Same structure, mirrored:
CCI signal:
CCI crosses down through the lower threshold.
Cloud filter: price must be below cloud (if enabled).
Lines filter: conversion & base must be below cloud (if enabled).
MA filter: Close must be below MA (if enabled).
allowShort must be true.
Position check: position size ≥ 0 (allows reversal from long to short).
Then:
strategy.entry("Short", strategy.short, qty = calculated_qty)
Flags update:
allowShort = false
allowLong = true
7.3 Exits
While in a position:
The strategy continuously recalculates SL (depending on chosen mode) and, in Percent mode, TP.
In Fib mode, fixed TP levels are computed at entry.
BreakEven may raise/tighten the SL if its conditions are met.
Exits are executed via strategy.exit:
Percent mode: one TP+SL exit per side.
Fib mode: two partial exits (TP1 and TP2) sharing the same SL.
At position open, the script also draws visual lines:
White line — entry price.
Green line(s) — TP level(s).
Red line — SL (if not using Ichimoku Trailing; with trailing, the red line is updated dynamically).
Maximum of 30 lines are kept to avoid clutter.
8. How to Use the Strategy
Choose market & timeframe
Works well on trending instruments. Try crypto, FX or indices on H1–H4, or intraday if you prefer more trades.
Adjust Ichimoku settings
Keep defaults (9/26/52/26) or adapt to your timeframe.
Configure Moving Average
Typical: EMA 200 as a trend filter.
Turn MA Direction Filter ON if you want to trade only with the main trend.
Set CCI thresholds
Default ±100 is classic.
Lower thresholds → more signals, higher noise.
Higher thresholds → fewer but stronger signals.
Enable/disable filters
Turn on Ichimoku Cloud and Ichimoku Lines if you want only “clean” trend trades.
Use Wait Position Close Before Flag Reset to control how often re-entries are allowed.
Choose TP & SL mode
Percent mode is simpler and easier to understand.
Fibonacci mode is more advanced: it aligns TP levels with the distance to stop, giving asymmetric RR setups (two partial TPs).
Choose Stable SL for fixed-risk trades, or Ichimoku / Ichimoku Trailing to tie stops to the cloud structure.
Set BreakEven
Enable BE if you want to lock in risk-free trades after a certain move.
Percent mode is straightforward; Fib mode keeps BreakEven in harmony with your Fib TP setup.
Run Backtest & Optimize
Press “Add to chart” → go to Strategy Tester.
Adjust parameters to your market and timeframe.
Look at equity curve, PF, drawdown, average trade, etc.
Live / Paper Trading
After you’re satisfied with backtest results, use the strategy to generate signals.
You can mirror entries/exits manually or connect them to alerts (if you build an alert-based execution layer).
BAY_PIVOT S/R(4 Full Lines + ALL Labels)//@version=5
indicator("BAY_PIVOT S/R(4 Full Lines + ALL Labels)", overlay=true, max_labels_count=500, max_lines_count=500)
// ────────────────────── TOGGLES ──────────────────────
showPivot = input.bool(true, "Show Pivot (Full Line + Label)")
showTarget = input.bool(true, "Show Target (Full Line + Label)")
showLast = input.bool(true, "Show Last Close (Full Line + Label)")
showPrevClose = input.bool(true, "Show Previous Close (Full Line + Label)")
useBarchartLast = input.bool(true, "Use Barchart 'Last' (Settlement Price)")
showR1R2R3 = input.bool(true, "Show R1 • R2 • R3")
showS1S2S3 = input.bool(true, "Show S1 • S2 • S3")
showStdDev = input.bool(true, "Show ±1σ ±2σ ±3σ")
showFib4W = input.bool(true, "Show 4-Week Fibs")
showFib13W = input.bool(true, "Show 13-Week Fibs")
showMonthHL = input.bool(true, "Show 1M High / Low")
showEntry1 = input.bool(false, "Show Manual Entry 1")
showEntry2 = input.bool(false, "Show Manual Entry 2")
entry1 = input.float(0.0, "Manual Entry 1", step=0.25)
entry2 = input.float(0.0, "Manual Entry 2", step=0.25)
stdLen = input.int(20, "StdDev Length", minval=1)
fib4wBars = input.int(20, "4W Fib Lookback")
fib13wBars = input.int(65, "13W Fib Lookback")
// ────────────────────── DAILY CALCULATIONS ──────────────────────
high_y = request.security(syminfo.tickerid, "D", high , lookahead=barmerge.lookahead_on)
low_y = request.security(syminfo.tickerid, "D", low , lookahead=barmerge.lookahead_on)
close_y = request.security(syminfo.tickerid, "D", close , lookahead=barmerge.lookahead_on)
pivot = (high_y + low_y + close_y) / 3
r1 = pivot + 0.382 * (high_y - low_y)
r2 = pivot + 0.618 * (high_y - low_y)
r3 = pivot + (high_y - low_y)
s1 = pivot - 0.382 * (high_y - low_y)
s2 = pivot - 0.618 * (high_y - low_y)
s3 = pivot - (high_y - low_y)
prevClose = close_y
last = useBarchartLast ? request.security(syminfo.tickerid, "D", close , lookahead=barmerge.lookahead_off) : close
target = pivot + (pivot - prevClose)
// StdDev + Fibs + Monthly (unchanged)
basis = ta.sma(close, stdLen)
dev = ta.stdev(close, stdLen)
stdRes1 = basis + dev
stdRes2 = basis + dev*2
stdRes3 = basis + dev*3
stdSup1 = basis - dev
stdSup2 = basis - dev*2
stdSup3 = basis - dev*3
high4w = ta.highest(high, fib4wBars)
low4w = ta.lowest(low, fib4wBars)
fib382_4w = high4w - (high4w - low4w) * 0.382
fib50_4w = high4w - (high4w - low4w) * 0.500
high13w = ta.highest(high, fib13wBars)
low13w = ta.lowest(low, fib13wBars)
fib382_13w_high = high13w - (high13w - low13w) * 0.382
fib50_13w = high13w - (high13w - low13w) * 0.500
fib382_13w_low = low13w + (high13w - low13w) * 0.382
monthHigh = ta.highest(high, 30)
monthLow = ta.lowest(low, 30)
// ────────────────────── COLORS ──────────────────────
colRed = color.rgb(255,0,0)
colLime = color.rgb(0,255,0)
colYellow = color.rgb(255,255,0)
colOrange = color.rgb(255,165,0)
colWhite = color.rgb(255,255,255)
colGray = color.rgb(128,128,128)
colMagenta = color.rgb(255,0,255)
colPink = color.rgb(233,30,99)
colCyan = color.rgb(0,188,212)
colBlue = color.rgb(0,122,255)
colPurple = color.rgb(128,0,128)
colRed50 = color.new(colRed,50)
colGreen50 = color.new(colLime,50)
// ────────────────────── 4 KEY FULL LINES ──────────────────────
plot(showPivot ? pivot : na, title="PIVOT", color=colYellow, linewidth=3, style=plot.style_linebr)
plot(showTarget ? target : na, title="TARGET", color=colOrange, linewidth=2, style=plot.style_linebr)
plot(showLast ? last : na, title="LAST", color=colWhite, linewidth=2, style=plot.style_linebr)
plot(showPrevClose ? prevClose : na, title="PREV CLOSE",color=colGray, linewidth=1, style=plot.style_linebr)
// ────────────────────── LABELS FOR ALL 4 KEY LEVELS (SAME STYLE AS OTHERS) ──────────────────────
f_label(price, txt, bgColor, txtColor) =>
if barstate.islast and not na(price)
label.new(bar_index, price, txt, style=label.style_label_left, color=bgColor, textcolor=txtColor, size=size.small)
if barstate.islast
showPivot ? f_label(pivot, "PIVOT\n" + str.tostring(pivot, "#.##"), colYellow, color.black) : na
showTarget ? f_label(target, "TARGET\n" + str.tostring(target, "#.##"), colOrange, color.white) : na
showLast ? f_label(last, "LAST\n" + str.tostring(last, "#.##"), colWhite, color.black) : na
showPrevClose ? f_label(prevClose, "PREV CLOSE\n"+ str.tostring(prevClose, "#.##"), colGray, color.white) : na
// ────────────────────── OTHER LEVELS – line stops at label ──────────────────────
f_level(p, txt, tc, lc, w=1) =>
if barstate.islast and not na(p)
lbl = label.new(bar_index, p, txt, style=label.style_label_left, color=lc, textcolor=tc, size=size.small)
line.new(bar_index-400, p, label.get_x(lbl), p, extend=extend.none, color=lc, width=w)
if barstate.islast
if showR1R2R3
f_level(r1, "R1\n" + str.tostring(r1, "#.##"), color.white, colRed)
f_level(r2, "R2\n" + str.tostring(r2, "#.##"), color.white, colRed)
f_level(r3, "R3\n" + str.tostring(r3, "#.##"), color.white, colRed, 2)
if showS1S2S3
f_level(s1, "S1\n" + str.tostring(s1, "#.##"), color.black, colLime)
f_level(s2, "S2\n" + str.tostring(s2, "#.##"), color.black, colLime)
f_level(s3, "S3\n" + str.tostring(s3, "#.##"), color.black, colLime, 2)
if showStdDev
f_level(stdRes1, "+1σ\n" + str.tostring(stdRes1, "#.##"), color.white, colPink)
f_level(stdRes2, "+2σ\n" + str.tostring(stdRes2, "#.##"), color.white, colPink)
f_level(stdRes3, "+3σ\n" + str.tostring(stdRes3, "#.##"), color.white, colPink, 2)
f_level(stdSup1, "-1σ\n" + str.tostring(stdSup1, "#.##"), color.white, colCyan)
f_level(stdSup2, "-2σ\n" + str.tostring(stdSup2, "#.##"), color.white, colCyan)
f_level(stdSup3, "-3σ\n" + str.tostring(stdSup3, "#.##"), color.white, colCyan, 2)
if showFib4W
f_level(fib382_4w, "38.2% 4W\n" + str.tostring(fib382_4w, "#.##"), color.white, colMagenta)
f_level(fib50_4w, "50% 4W\n" + str.tostring(fib50_4w, "#.##"), color.white, colMagenta)
if showFib13W
f_level(fib382_13w_high, "38.2% 13W High\n" + str.tostring(fib382_13w_high, "#.##"), color.white, colMagenta)
f_level(fib50_13w, "50% 13W\n" + str.tostring(fib50_13w, "#.##"), color.white, colMagenta)
f_level(fib382_13w_low, "38.2% 13W Low\n" + str.tostring(fib382_13w_low, "#.##"), color.white, colMagenta)
if showMonthHL
f_level(monthHigh, "1M HIGH\n" + str.tostring(monthHigh, "#.##"), color.white, colRed50, 2)
f_level(monthLow, "1M LOW\n" + str.tostring(monthLow, "#.##"), color.white, colGreen50, 2)
// Manual entries
plot(showEntry1 and entry1 > 0 ? entry1 : na, "Entry 1", color=colBlue, linewidth=2, style=plot.style_linebr)
plot(showEntry2 and entry2 > 0 ? entry2 : na, "Entry 2", color=colPurple, linewidth=2, style=plot.style_linebr)
// Background
bgcolor(close > pivot ? color.new(color.blue, 95) : color.new(color.red, 95))
Big Candle Identifier with RSI Divergence and Advanced Stops1. Strategy Objective
The main goal of this strategy is to:
Identify significant price momentum (big candles).
Enter trades at opportune moments based on market signals (candlestick patterns and RSI divergence).
Limit initial risk through a fixed stop loss.
Maximize profits by using a trailing stop that activates only after the trade moves a specified distance in the profitable direction.
2. Components of the Strategy
A. Big Candle Identification
The strategy identifies big candles as indicators of strong momentum.
A big candle is defined as:
The body (absolute difference between close and open) of the current candle (body0) is larger than the bodies of the last five candles.
The candle is:
Bullish Big Candle: If close > open.
Bearish Big Candle: If open > close.
Purpose: Big candles signal potential continuation or reversal of trends, serving as the primary entry trigger.
B. RSI Divergence
Relative Strength Index (RSI): A momentum oscillator used to detect overbought/oversold conditions and divergence.
Fast RSI: A 5-period RSI, which is more sensitive to short-term price movements.
Slow RSI: A 14-period RSI, which smoothens fluctuations over a longer timeframe.
Divergence: The difference between the fast and slow RSIs.
Positive divergence (divergence > 0): Bullish momentum.
Negative divergence (divergence < 0): Bearish momentum.
Visualization: The divergence is plotted on the chart, helping traders confirm momentum shifts.
C. Stop Loss
Initial Stop Loss:
When entering a trade, an immediate stop loss of 200 points is applied.
This stop loss ensures the maximum risk is capped at a predefined level.
Implementation:
Long Trades: Stop loss is set below the entry price at low - 200 points.
Short Trades: Stop loss is set above the entry price at high + 200 points.
Purpose:
Prevents significant losses if the price moves against the trade immediately after entry.
D. Trailing Stop
The trailing stop is a dynamic risk management tool that adjusts with price movements to lock in profits. Here’s how it works:
Activation Condition:
The trailing stop only starts trailing when the trade moves 200 ticks (profit) in the right direction:
Long Position: close - entry_price >= 200 ticks.
Short Position: entry_price - close >= 200 ticks.
Trailing Logic:
Once activated, the trailing stop:
For Long Positions: Trails behind the price by 150 ticks (trail_stop = close - 150 ticks).
For Short Positions: Trails above the price by 150 ticks (trail_stop = close + 150 ticks).
Exit Condition:
The trade exits automatically if the price touches the trailing stop level.
Purpose:
Ensures profits are locked in as the trade progresses while still allowing room for price fluctuations.
E. Trade Entry Logic
Long Entry:
Triggered when a bullish big candle is identified.
Stop loss is set at low - 200 points.
Short Entry:
Triggered when a bearish big candle is identified.
Stop loss is set at high + 200 points.
F. Trade Exit Logic
Trailing Stop: Automatically exits the trade if the price touches the trailing stop level.
Fixed Stop Loss: Exits the trade if the price hits the predefined stop loss level.
G. 21 EMA
The strategy includes a 21-period Exponential Moving Average (EMA), which acts as a trend filter.
EMA helps visualize the overall market direction:
Price above EMA: Indicates an uptrend.
Price below EMA: Indicates a downtrend.
H. Visualization
Big Candle Identification:
The open and close prices of big candles are plotted for easy reference.
Trailing Stop:
Plotted on the chart to visualize its progression during the trade.
Green Line: Indicates the trailing stop for long positions.
Red Line: Indicates the trailing stop for short positions.
RSI Divergence:
Positive divergence is shown in green.
Negative divergence is shown in red.
3. Key Parameters
trail_start_ticks: The number of ticks required before the trailing stop activates (default: 200 ticks).
trail_distance_ticks: The distance between the trailing stop and price once the trailing stop starts (default: 150 ticks).
initial_stop_loss_points: The fixed stop loss in points applied at entry (default: 200 points).
tick_size: Automatically calculates the minimum tick size for the trading instrument.
4. Workflow of the Strategy
Step 1: Entry Signal
The strategy identifies a big candle (bullish or bearish).
If conditions are met, a trade is entered with a fixed stop loss.
Step 2: Initial Risk Management
The trade starts with an initial stop loss of 200 points.
Step 3: Trailing Stop Activation
If the trade moves 200 ticks in the profitable direction:
The trailing stop is activated and follows the price at a distance of 150 ticks.
Step 4: Exit the Trade
The trade is exited if:
The price hits the trailing stop.
The price hits the initial stop loss.
5. Advantages of the Strategy
Risk Management:
The fixed stop loss ensures that losses are capped.
The trailing stop locks in profits after the trade becomes profitable.
Momentum-Based Entries:
The strategy uses big candles as entry triggers, which often indicate strong price momentum.
Divergence Confirmation:
RSI divergence helps validate momentum and avoid false signals.
Dynamic Profit Protection:
The trailing stop adjusts dynamically, allowing the trade to capture larger moves while protecting gains.
6. Ideal Market Conditions
This strategy performs best in:
Trending Markets:
Big candles and momentum signals are more effective in capturing directional moves.
High Volatility:
Larger price swings improve the probability of reaching the trailing stop activation level (200 ticks).
Nef33 Forex & Crypto Trading Signals PRO
1. Understanding the Indicator's Context
The indicator generates signals based on confluence (trend, volume, key zones, etc.), but it does not include predefined SL or TP levels. To establish them, we must:
Use dynamic or static support/resistance levels already present in the script.
Incorporate volatility (such as ATR) to adjust the levels based on market conditions.
Define a risk/reward ratio (e.g., 1:2).
2. Options for Determining SL and TP
Below, I provide several ideas based on the tools available in the script:
Stop Loss (SL)
The SL should protect you from adverse movements. You can base it on:
ATR (Volatility): Use the smoothed ATR (atr_smooth) multiplied by a factor (e.g., 1.5 or 2) to set a dynamic SL.
Buy: SL = Entry Price - (atr_smooth * atr_mult).
Sell: SL = Entry Price + (atr_smooth * atr_mult).
Key Zones: Place the SL below a support (for buys) or above a resistance (for sells), using Order Blocks, Fair Value Gaps, or Liquidity Zones.
Buy: SL below the nearest ob_lows or fvg_lows.
Sell: SL above the nearest ob_highs or fvg_highs.
VWAP: Use the daily VWAP (vwap_day) as a critical level.
Buy: SL below vwap_day.
Sell: SL above vwap_day.
Take Profit (TP)
The TP should maximize profits. You can base it on:
Risk/Reward Ratio: Multiply the SL distance by a factor (e.g., 2 or 3).
Buy: TP = Entry Price + (SL Distance * 2).
Sell: TP = Entry Price - (SL Distance * 2).
Key Zones: Target the next resistance (for buys) or support (for sells).
Buy: TP at the next ob_highs, fvg_highs, or liq_zone_high.
Sell: TP at the next ob_lows, fvg_lows, or liq_zone_low.
Ichimoku: Use the cloud levels (Senkou Span A/B) as targets.
Buy: TP at senkou_span_a or senkou_span_b (whichever is higher).
Sell: TP at senkou_span_a or senkou_span_b (whichever is lower).
3. Practical Implementation
Since the script does not automatically draw SL/TP, you can:
Calculate them manually: Observe the chart and use the levels mentioned.
Modify the code: Add SL/TP as labels (label.new) at the moment of the signal.
Here’s an example of how to modify the code to display SL and TP based on ATR with a 1:2 risk/reward ratio:
Modified Code (Signals Section)
Find the lines where the signals (trade_buy and trade_sell) are generated and add the following:
pinescript
// Calculate SL and TP based on ATR
atr_sl_mult = 1.5 // Multiplier for SL
atr_tp_mult = 3.0 // Multiplier for TP (1:2 ratio)
sl_distance = atr_smooth * atr_sl_mult
tp_distance = atr_smooth * atr_tp_mult
if trade_buy
entry_price = close
sl_price = entry_price - sl_distance
tp_price = entry_price + tp_distance
label.new(bar_index, low, "Buy: " + str.tostring(math.round(bull_conditions, 1)), color=color.green, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bar_index, sl_price, "SL: " + str.tostring(math.round(sl_price, 2)), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bar_index, tp_price, "TP: " + str.tostring(math.round(tp_price, 2)), color=color.blue, textcolor=color.white, style=label.style_label_up, size=size.tiny)
if trade_sell
entry_price = close
sl_price = entry_price + sl_distance
tp_price = entry_price - tp_distance
label.new(bar_index, high, "Sell: " + str.tostring(math.round(bear_conditions, 1)), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bar_index, sl_price, "SL: " + str.tostring(math.round(sl_price, 2)), color=color.red, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bar_index, tp_price, "TP: " + str.tostring(math.round(tp_price, 2)), color=color.blue, textcolor=color.white, style=label.style_label_down, size=size.tiny)
Code Explanation
SL: Calculated by subtracting/adding sl_distance to the entry price (close) depending on whether it’s a buy or sell.
TP: Calculated with a double distance (tp_distance) for a 1:2 risk/reward ratio.
Visualization: Labels are added to the chart to display SL (red) and TP (blue).
4. Practical Strategy Without Modifying the Code
If you don’t want to modify the script, follow these steps manually:
Entry: Take the trade_buy or trade_sell signal.
SL: Check the smoothed ATR (atr_smooth) on the chart or calculate a fixed level (e.g., 1.5 times the ATR). Also, review nearby key zones (OB, FVG, VWAP).
TP: Define a target based on the next key zone or multiply the SL distance by 2 or 3.
Example:
Buy at 100, ATR = 2.
SL = 100 - (2 * 1.5) = 97.
TP = 100 + (2 * 3) = 106.
5. Recommendations
Test in Demo: Apply this logic in a demo account to adjust the multipliers (atr_sl_mult, atr_tp_mult) based on the market (forex or crypto).
Combine with Zones: If the ATR-based SL is too wide, use the nearest OB or FVG as a reference.
Risk/Reward Ratio: Adjust the TP based on your tolerance (1:1, 1:2, 1:3)






















