proof quant model v1team, this is the model for our class. It is public but yeah its not like there will be specific ip or stuff like that. Get to work
Indicatori e strategie
ORB Asia London NYORB – Asia London NY in UTC time
Can adjust time settings to your own ORB strategy.
ZigZag forceLibrary "ZigZag"
method lastPivot(this)
Retrieves the last `Pivot` object's reference from a `ZigZag` object's `pivots`
array if it contains at least one element, or `na` if the array is empty.
Callable as a method or a function.
Namespace types: ZigZag
Parameters:
this (ZigZag) : (series ZigZag) The `ZigZag` object's reference.
Returns: (Pivot) The reference of the last `Pivot` instance in the `ZigZag` object's
`pivots` array, or `na` if the array is empty.
method update(this)
Updates a `ZigZag` object's pivot information, volume data, lines, and
labels when it detects new pivot points.
NOTE: This function requires a single execution on each bar for accurate
calculations.
Callable as a method or a function.
Namespace types: ZigZag
Parameters:
this (ZigZag) : (series ZigZag) The `ZigZag` object's reference.
Returns: (bool) `true` if the function detects a new pivot point and updates the
`ZigZag` object's data, `false` otherwise.
newInstance(settings)
Creates a new `ZigZag` instance with optional settings.
Parameters:
settings (Settings) : (series Settings) Optional. A `Settings` object's reference for the new
`ZigZag` instance's `settings` field. If `na`, the `ZigZag` instance
uses a new `Settings` object with default properties. The default is `na`.
Returns: (ZigZag) A new `ZigZag` object's reference.
Settings
A structure for objects that store calculation and display properties for `ZigZag` instances.
Fields:
devThreshold (series float) : The minimum percentage deviation from a previous pivot point required to change the Zig Zag's direction.
depth (series int) : The number of bars required for pivot point detection.
lineColor (series color) : The color of each line in the Zig Zag drawing.
extendLast (series bool) : Specifies whether the Zig Zag drawing includes a line connecting the most recent pivot point to the latest bar's `close`.
displayReversalPrice (series bool) : Specifies whether the Zig Zag drawing shows pivot prices in its labels.
displayCumulativeVolume (series bool) : Specifies whether the Zig Zag drawing shows the cumulative volume between pivot points in its labels.
displayReversalPriceChange (series bool) : Specifies whether the Zig Zag drawing shows the reversal amount from the previous pivot point in each label.
differencePriceMode (series string) : The reversal amount display mode. Possible values: `"Absolute"` for price change or `"Percent"` for percentage change.
draw (series bool) : Specifies whether the Zig Zag drawing displays its lines and labels.
allowZigZagOnOneBar (series bool) : Specifies whether the Zig Zag calculation can register a pivot high *and* pivot low on the same bar.
Pivot
A structure for objects that store chart point references, drawing references, and volume information for `ZigZag` instances.
Fields:
ln (series line) : References a `line` object that connects the coordinates from the `start` and `end` chart points.
lb (series label) : References a `label` object that displays pivot data at the `end` chart point's coordinates.
isHigh (series bool) : Specifies whether the pivot at the `end` chart point's coordinates is a pivot high.
vol (series float) : The cumulative volume across the bars between the `start` and `end` chart points.
start (chart.point) : References a `chart.point` object containing the coordinates of the previous pivot point.
end (chart.point) : References a `chart.point` object containing the coordinates of the current pivot point.
ZigZag
A structure for objects that maintain Zig Zag drawing settings, pivots, and cumulative volume data.
Fields:
settings (Settings) : References a `Settings` object that specifies the Zig Zag drawing's calculation and display properties.
pivots (array) : References an array of `Pivot` objects that store pivot point, drawing, and volume information.
sumVol (series float) : The cumulative volume across bars covered by the latest `Pivot` object's line segment.
extend (Pivot) : References a `Pivot` object that projects a line from the last confirmed pivot point to the current bar's `close`.
Custom Moving average(5,20,200,245,365)이동 평균선을 기준으로 5,20,200,245,365일선을 표기하였고,
200, 245, 365일선 인접 구간 진입시에 차트에 표시 및 알람설정 가능하게 만들었습니다.
Set up 5,20,200,245,365-day Moving Averages on the chart.
Added visual markers and alerts for when the price hits the threshold of the 200, 245, and 365 day lines
LO1_News2024H1Library "LO1_News2024H1"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()
LO1_News2026H1Library "LO1_News2026H1"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()
LO1_News2025H2Library "LO1_News2025H2"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()
LO1_News2025H1Library "LO1_News2025H1"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()
LO1_News2024H2Library "LO1_News2024H2"
Support Library for News Events
f_loadNewsRows()
f_loadExcSevByTypeId()
f_loadExcTagByTypeId()
f_loadExcDelayAfterNewsMins()
LO1_NewsTypesLibrary "LO1_NewsTypes" -
Support library for news system, allow selectable news events.
f_hhmmToMs(_hhmm)
Parameters:
_hhmm (int)
f_addNews(_d, _hhmm, _tid, _dArr, _tArr, _idArr)
Parameters:
_d (string)
_hhmm (int)
_tid (int)
_dArr (array)
_tArr (array)
_idArr (array)
f_addNewsMs(_d, _ms, _tid, _dArr, _tArr, _idArr)
Parameters:
_d (string)
_ms (int)
_tid (int)
_dArr (array)
_tArr (array)
_idArr (array)
f_loadTypeSevByTypeId()
LO1_TradersPostLibrary "LO1_TradersPost"
Enhanced TradersPost integration library with comprehensive order management
_buildJSONField(key, value, required)
Build a JSON field with proper handling of required vs optional fields
Parameters:
key (string) : The JSON key name
value (string) : The value to include (any type, will be converted to string)
required (bool) : If true, field is always included even if value is na/empty
Returns: String containing JSON field or empty string if optional and na/empty
_buildConditionalField(key, value)
Build a conditional JSON field that's only included if value is valid
Parameters:
key (string) : The JSON key name
value (string) : The value to include
Returns: String containing JSON field or empty string if value is na/empty
_buildConditionalNumericField(key, value)
Build a conditional JSON field for numeric values
Parameters:
key (string) : The JSON key name
value (float) : The numeric value
Returns: String containing JSON field or empty string if value is na
_buildNestedObject(objectType, price, amount, percent, stopType, limitPrice, trailAmount, trailPercent)
Build nested JSON objects for takeProfit/stopLoss
Parameters:
objectType (string) : The type of object being built ("takeProfit" or "stopLoss")
price (float) : The limit price for TP or stop price for SL
amount (float) : The dollar amount (optional)
percent (float) : The percentage (optional)
stopType (series StopLossType) : The stop loss type - only for stopLoss
limitPrice (float) : The limit price for stop_limit orders - only for stopLoss
trailAmount (float) : Trailing amount for trailing stops - only for stopLoss
trailPercent (float) : Trailing percent for trailing stops - only for stopLoss
Returns: String containing nested JSON object or empty string if no valid data
_validateAndBuildJSON(ticker, action, quantity, quantityType, orderType, sentiment, cancel, timeInForce, limitPrice, stopPrice, trailAmount, trailPercent, takeProfitPrice, takeProfitAmount, takeProfitPercent, stopLossPrice, stopLossAmount, stopLossPercent, stopLossType, stopLossLimitPrice, extendedHours, optionType, intrinsicValue, expiration, strikePrice, signalPrice, comment)
Master JSON builder that validates parameters and constructs JSON
Parameters:
ticker (string) : The trading symbol
action (series Action) : The order action (buy, sell, exit, etc.)
quantity (float) : The order quantity
quantityType (series QuantityType) : The type of quantity (fixed, dollar, percent)
orderType (series OrderType) : The order type (market, limit, stop, etc.)
sentiment (series Sentiment) : The position sentiment (long, short, flat) - optional
cancel (bool) : Controls order cancellation (true = cancel existing orders, false = don't cancel)
timeInForce (series TimeInForce) : Time in force for the order (DAY, GTC, IOC, FOK)
limitPrice (float) : Price for limit orders
stopPrice (float) : Price for stop orders
trailAmount (float) : Trailing amount for trailing stops
trailPercent (float) : Trailing percent for trailing stops
takeProfitPrice (float) : Take profit limit price (absolute)
takeProfitAmount (float) : Take profit dollar amount (relative)
takeProfitPercent (float) : Take profit percentage (relative)
stopLossPrice (float) : Stop loss price (absolute)
stopLossAmount (float) : Stop loss dollar amount (relative)
stopLossPercent (float) : Stop loss percentage (relative)
stopLossType (series StopLossType) : Stop loss order type
stopLossLimitPrice (float) : Limit price for stop_limit orders
extendedHours (bool) : Enable extended hours trading (boolean)
optionType (series OptionType) : Option type for options trading (both/call/put)
intrinsicValue (series IntrinsicValue) : Intrinsic value filter for options (itm/otm)
expiration (string) : Option expiration (date string)
strikePrice (float) : Option strike price
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment for the order (shows in TradersPost UI for debugging)
Returns: ErrorResponse with success status and JSON string or error details
ValidateOrder(ticker, action, orderType, limitPrice, stopPrice)
Validate order parameters before JSON construction
Parameters:
ticker (string) : Trading symbol
action (series Action) : Order action
orderType (series OrderType) : Order type (market, limit, stop, etc.)
limitPrice (float) : Limit price for limit orders
stopPrice (float) : Stop price for stop orders
Returns: ErrorResponse with validation results
ValidateQuantity(quantity, quantityType)
Validate quantity based on type and constraints
Parameters:
quantity (float) : The quantity value
quantityType (series QuantityType) : The type of quantity
Returns: ErrorResponse with validation results
ValidatePrices(entryPrice, stopPrice, takeProfitPrice, action)
Validate price relationships and values
Parameters:
entryPrice (float) : Entry price for the order
stopPrice (float) : Stop loss price
takeProfitPrice (float) : Take profit price
action (series Action) : Order action (buy/sell)
Returns: ErrorResponse with validation results
ValidateSymbol(ticker)
Validate trading symbol format
Parameters:
ticker (string) : The symbol to validate
Returns: ErrorResponse with validation results
CombineValidationResults(validationResults)
Create validation error collection and reporting system
Parameters:
validationResults (array) : Array of ErrorResponse objects from multiple validations
Returns: Combined ErrorResponse with all validation results
ValidateCompleteOrder(ticker, action, quantity, quantityType, orderType, limitPrice, stopPrice, takeProfitPrice)
Comprehensive validation for all order parameters
Parameters:
ticker (string) : Trading symbol
action (series Action) : Order action
quantity (float) : Order quantity
quantityType (series QuantityType) : Type of quantity
orderType (series OrderType) : Order type
limitPrice (float) : Limit price (optional)
stopPrice (float) : Stop price (optional)
takeProfitPrice (float) : Take profit price (optional)
Returns: ErrorResponse with complete validation results
CreateErrorResponse(success, errorMessages, message, severity, context, functionName)
Create standardized error response
Parameters:
success (bool) : Whether the operation succeeded
errorMessages (array) : Array of error messages
message (string) : Summary message
severity (series ErrorSeverity) : Error severity level
context (string) : Context where error occurred
functionName (string) : Name of function that generated error
Returns: EnhancedErrorResponse with all error details
HandleValidationError(validationResult, context, functionName)
Handle validation errors with context
Parameters:
validationResult (ErrorResponse) : The validation result to handle
context (string) : Description of what was being validated
functionName (string) : Name of calling function
Returns: Processed error response with enhanced context
LogError(errorResponse, displayOnChart)
Log error with appropriate level
Parameters:
errorResponse (EnhancedErrorResponse) : The error response to log
displayOnChart (bool) : Whether to show error on chart
CreateSuccessResponse(message, context, functionName)
Create success response
Parameters:
message (string) : Success message
context (string) : Context of successful operation
functionName (string) : Name of function
Returns: Success response
_validateJSONConstruction(jsonString)
Validate JSON construction and handle malformed data
Parameters:
jsonString (string) : The constructed JSON string
Returns: ErrorResponse indicating if JSON is valid
CreateDetailedError(success, errors, warnings, severity, context)
Create detailed error response with context
Parameters:
success (bool) : Operation success status
errors (array) : Array of error messages
warnings (array) : Array of warning messages
severity (series ErrorSeverity) : Error severity level
context (string) : Context where error occurred
Returns: DetailedErrorResponse object
LogDetailedError(response)
Log detailed error response with appropriate severity
Parameters:
response (DetailedErrorResponse) : DetailedErrorResponse to log
Returns: Nothing - logs to Pine Script console
CombineIntoDetailedResponse(responses, context)
Combine multiple error responses into detailed response
Parameters:
responses (array) : Array of ErrorResponse objects to combine
context (string) : Context for the combined operation
Returns: DetailedErrorResponse with combined results
SendAdvancedOrder(ticker, action, quantity, quantityType, orderType, sentiment, cancel, limitPrice, stopPrice, trailAmount, trailPercent, takeProfitPrice, takeProfitAmount, takeProfitPercent, stopLossPrice, stopLossAmount, stopLossPercent, stopLossType, stopLossLimitPrice, extendedHours, optionType, intrinsicValue, expiration, strikePrice, signalPrice, comment)
Send advanced order with comprehensive parameter validation and JSON construction
Parameters:
ticker (string) : Symbol to trade (defaults to syminfo.ticker)
action (series Action) : Order action (buy/sell/exit/cancel/add)
quantity (float) : Order quantity
quantityType (series QuantityType) : Type of quantity (fixed/dollar/percent)
orderType (series OrderType) : Type of order (market/limit/stop/stop_limit/trailing_stop)
sentiment (series Sentiment) : Position sentiment (long/short/flat, optional)
cancel (bool) : Controls order cancellation (true = cancel existing, false = don't cancel, na = use defaults)
limitPrice (float) : Limit price for limit orders
stopPrice (float) : Stop price for stop orders
trailAmount (float) : Trailing amount for trailing stops
trailPercent (float) : Trailing percent for trailing stops
takeProfitPrice (float) : Take profit limit price (absolute)
takeProfitAmount (float) : Take profit dollar amount (relative)
takeProfitPercent (float) : Take profit percentage (relative)
stopLossPrice (float) : Stop loss price (absolute)
stopLossAmount (float) : Stop loss dollar amount (relative)
stopLossPercent (float) : Stop loss percentage (relative)
stopLossType (series StopLossType) : Stop loss order type
stopLossLimitPrice (float) : Limit price for stop_limit orders
extendedHours (bool) : Enable extended hours trading (boolean)
optionType (series OptionType) : Option type for options trading (both/call/put)
intrinsicValue (series IntrinsicValue) : Intrinsic value filter for options (itm/otm)
expiration (string) : Option expiration (date string)
strikePrice (float) : Option strike price
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment for the order (shows in TradersPost UI for debugging)
Returns: ErrorResponse with success status and JSON or error details
SendSentiment(ticker, sentiment, quantity, quantityType, signalPrice, comment)
Send sentiment-based position management order
Parameters:
ticker (string) : Symbol to manage (defaults to syminfo.ticker)
sentiment (series Sentiment) : Target position sentiment (long/short/flat)
quantity (float) : Position size (optional, uses account default if not specified)
quantityType (series QuantityType) : Type of quantity specification
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment
Returns: ErrorResponse with success status
SendCancelAll(ticker, comment)
Cancel all open orders for the specified symbol
Parameters:
ticker (string) : Symbol to cancel orders for (defaults to syminfo.ticker)
comment (string) : Optional comment for the cancellation
Returns: ErrorResponse with success status
SendOrderNoCancelExisting(ticker, action, quantity, quantityType, orderType, sentiment, limitPrice, stopPrice, takeProfitPrice, takeProfitAmount, takeProfitPercent, stopLossPrice, stopLossAmount, stopLossPercent, stopLossType, stopLossLimitPrice, signalPrice, comment)
Send order without canceling existing orders
Parameters:
ticker (string) : Symbol to trade (defaults to syminfo.ticker)
action (series Action) : Order action (buy/sell/exit)
quantity (float) : Order quantity
quantityType (series QuantityType) : Type of quantity (fixed/dollar/percent)
orderType (series OrderType) : Type of order (market/limit/stop/stop_limit)
sentiment (series Sentiment) : Position sentiment (long/short/flat, optional)
limitPrice (float) : Limit price for limit orders
stopPrice (float) : Stop price for stop orders
takeProfitPrice (float) : Take profit price
takeProfitAmount (float) : Take profit amount (optional)
takeProfitPercent (float)
stopLossPrice (float) : Stop loss price
stopLossAmount (float) : Stop loss amount (optional)
stopLossPercent (float) : Stop loss percentage (optional)
stopLossType (series StopLossType) : Stop loss order type
stopLossLimitPrice (float) : Limit price for stop_limit orders
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment
Returns: ErrorResponse with success status
_buildBracketOrderParams(orderType, entryPrice, entryLimitPrice)
Build bracket order parameters by routing entryPrice to correct parameter based on orderType
This helper function maps the conceptual "entryPrice" to the technical parameters needed
Parameters:
orderType (series OrderType) : The order type for the entry order
entryPrice (float) : The desired entry price (trigger for stops, limit for limits)
entryLimitPrice (float) : The limit price for stop_limit orders (optional)
Returns: array with correct routing
SendBracketOrder(ticker, action, quantity, quantityType, orderType, entryPrice, entryLimitPrice, takeProfitPrice, stopLossPrice, takeProfitAmount, takeProfitPercent, stopLossAmount, stopLossPercent, stopLossType, stopLossLimitPrice, signalPrice, comment)
Send bracket order (entry + take profit + stop loss)
Parameters:
ticker (string) : Symbol to trade
action (series Action) : Entry action (buy/sell)
quantity (float) : Order quantity
quantityType (series QuantityType) : Type of quantity specification
orderType (series OrderType) : Type of entry order
entryPrice (float) : Entry price (trigger price for stop orders, limit price for limit orders)
entryLimitPrice (float) : Entry limit price (only for stop_limit orders, defaults to entryPrice if na)
takeProfitPrice (float) : Take profit price
stopLossPrice (float) : Stop loss price
takeProfitAmount (float) : Take profit dollar amount (alternative to price)
takeProfitPercent (float) : Take profit percentage (alternative to price)
stopLossAmount (float) : Stop loss dollar amount (alternative to price)
stopLossPercent (float) : Stop loss percentage (alternative to price)
stopLossType (series StopLossType) : Stop loss order type
stopLossLimitPrice (float) : Limit price for stop_limit orders
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment
Returns: ErrorResponse with success status
SendOTOOrder(primaryTicker, primaryAction, primaryQuantity, primaryOrderType, primaryPrice, secondaryTicker, secondaryAction, secondaryQuantity, secondaryOrderType, secondaryPrice, signalPrice, comment)
Send One-Triggers-Other (OTO) order sequence
Note: OTO linking must be configured in TradersPost strategy settings
This sends two separate orders - TradersPost handles the OTO logic
Parameters:
primaryTicker (string) : Primary order ticker
primaryAction (series Action) : Primary order action
primaryQuantity (float) : Primary order quantity
primaryOrderType (series OrderType) : Primary entry type
primaryPrice (float) : Primary order price
secondaryTicker (string) : Secondary order ticker (defaults to primary ticker)
secondaryAction (series Action) : Secondary order action
secondaryQuantity (float) : Secondary order quantity
secondaryOrderType (series OrderType) : Secondary entry type
secondaryPrice (float) : Secondary order price
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment for both orders
Returns: ErrorResponse with success status
SendOCOOrder(ticker, firstAction, firstQuantity, firstOrderType, firstPrice, secondAction, secondQuantity, secondOrderType, secondPrice, signalPrice, comment)
Send One-Cancels-Other (OCO) order pair
Note: OCO linking must be configured in TradersPost strategy settings
This sends two separate orders - TradersPost handles the OCO logic
Parameters:
ticker (string) : Symbol for both orders
firstAction (series Action) : Action for first order
firstQuantity (float) : Quantity for first order
firstOrderType (series OrderType) : Order type for first order
firstPrice (float) : Price for first order
secondAction (series Action) : Action for second order
secondQuantity (float) : Quantity for second order
secondOrderType (series OrderType) : Order type for second order
secondPrice (float) : Price for second order
signalPrice (float) : The market price at alert time (for slippage tracking)
comment (string) : Optional comment
Returns: ErrorResponse with success status
ErrorResponse
Fields:
success (series bool)
errors (array)
message (series string)
EnhancedErrorResponse
Fields:
success (series bool)
errors (array)
message (series string)
severity (series ErrorSeverity)
context (series string)
timestamp (series int)
functionName (series string)
DetailedErrorResponse
Fields:
success (series bool)
errors (array)
warnings (array)
severity (series ErrorSeverity)
context (series string)
message (series string)
ORB Asia London NYThis script plots the highs & lows of all three market sessions Asia, London, and NY. in UTC The time frames can be adjusted to you're own ORB strategy.
The time period of opening range & the max timeframe to display it on can be adjusted from the settings.
So for eg. if want to use 15m NY ORB to trade, then set "NY time " as 14:30-14:45
All-in-one trend clarityTrendLens is a multi-layer, all-in-one overlay indicator designed to visually detect and filter market direction — not a buy/sell strategy.
It highlights early trend shifts based on candle behavior, then supports that view using Pivot High/Low structure, three customizable EMAs, and a visible daily session window to focus on active market hours.
What’s included (All inside one indicator)
Structural Trend Candles
If price closes above the highest high of the previous N bars → candle turns white (bullish structural breakout).
If price closes below the lowest low of the previous N bars → candle turns black (bearish structural breakdown).
Pivot High / Pivot Low Markers
Detects swing highs/lows using adjustable left/right bars (default 7) and plots small gray triangle markers on the chart.
Active Session Window
Highlights a fixed daily time window (default 06:00–18:00 UTC) with a transparent green background to visually mark the active trading session.
3 Customizable EMAs
EMA Fast (default 10)
EMA Mid (default 20)
EMA Long (default 100)
Each EMA supports custom length, source, color, and thickness.
How to use it
Use white/black candles as a quick trend filter and early structure shift cue.
Use EMA100 as the main trend bias reference; use EMA10/EMA20 positioning to gauge momentum.
Use Pivot High/Low to spot structure levels for potential support/resistance and risk management.
Enable the session highlight to focus analysis on high-activity hours.
Disclaimer
This indicator is a technical analysis helper, not a trading strategy.
It does not provide buy/sell recommendations. You are responsible for your own trade decisions and risk management.
UTC Daily High / Low Tracker (UTC Anchored)This indicator will track the Daily high and low AKA daily range of each day using UTC (00:00)
XAU PDH-PDL REV (Buy the Dip)Indicator Description – Buy the Dip first, then Continuation
This indicator is designed for trading Gold (XAUUSD) with an institutional, pullback-focused mindset. It prioritises **REV (Reversal) signals** to *buy the dip* or *sell the rip* after a **significant ATR-based pullback**, without relying on EMA reclaim (so strong trends aren’t missed). Only when no valid reversal is present will it allow **CONT (Continuation) signals**, aligned with trend and EMA pullbacks. Key targets are based on **Daily, Weekly, or Rolling liquidity levels**, and all prices are shown as **whole numbers** for clarity. Session awareness (NZ time) helps contextualise signals, while cooldown logic reduces noise and over-trading.
Strength Relative to XXX [Hysteresis Smoothed]Strength Relative to XXX
█ OVERVIEW
This versatile indicator measures the relative strength of the current charted asset against any user-selected benchmark symbol (e.g., BTC, ETH, SP:SPX, TVC:GOLD, or any other asset). Green fill = Current asset outperforming the benchmark (bullish relative strength).
Red fill = Current asset underperforming the benchmark (bearish relative weakness). Perfect for rotation strategies across crypto, stocks, forex, and commodities — quickly identify assets gaining momentum edge over a chosen benchmark.
█ HOW IT WORKS
• Relative Ratio : Calculates current close / benchmark close for normalized comparison.
• Smoothing : Applies a Simple Moving Average (SMA) to the ratio (adjustable length).
• Oscillator : Plots deviation from the SMA, centered around zero.
• Hysteresis Enhancement : Adds a small relative threshold (~0.03% default) to prevent rapid color flips from minor noise. Color persists until a convincing cross — stable blocks without lag.
█ FEATURES & INPUTS
• Compare to : Symbol input for any benchmark (match exchange for accuracy).
• MA Length : Smoothing period (default 10).
• Relative Hysteresis Threshold : Noise filter strength (default 0.0003; tweak for responsiveness vs. stability).
█ USAGE TIPS
• Apply to ALT/BTC pairs for crypto rotations, stocks vs. SP:SPX for sector strength, or any custom comparison.
• Works on all timeframes — ideal for short-term scans on 4H/daily.
• Green zones = potential outperformance; red = caution.
• Combine with volume or momentum for confluence.
This refined relative strength oscillator delivers clean, reliable visuals in volatile markets.
NQ Order Blocks with Buy/Sell & QtyA function call is split across multiple lines
Or arguments are broken after a comma
Or indentation is inconsisten
NQ Order Blocks (Smart Money)Shows the order blocks for different time frames
Detects Bullish Order Blocks (last down candle before impulsive up move)
Detects Bearish Order Blocks (last up candle before impulsive down move)
Plots rectangles (zones) on the chart
Works well on NQ 1m–15m and HTF confirmation
Lightweight & free






















