PINE LIBRARY

FT_TV_Cond

162
FT_TV_Cond is a Pine Script® v6 library which provides reusable market-condition filters for systematic and algorithmic trading strategies.

The library operates on the structured OHLC and pre-calculated market context used by other strategies framework. It evaluates configurable conditions across the current Day/Session, previous completed periods and a broader five-period market context.

Available conditions cover a wide range of price-action concepts, including directional movement, OHLC relationships, breakouts, range and body expansion or contraction, recent extrema, crossovers, gaps, session development and multi-period market structure.

Main exported functionality

  • Pine Script®
    — Evaluates conditions primarily related to the current Day/Session and current chart bars. Available filters include intraday directional movement, current OHLC relationships, new highs/lows, breakouts, range/body comparisons, session-start relationships and other current-period price-action structures.
  • Pine Script®
    — Evaluates conditions centered on the previous completed Day/Session, comparing its Open, High, Low, Close, range and body with the current period and earlier historical periods.
  • Pine Script®
    — Extends the same condition framework to the OHLC period two Day/Sessions back, allowing strategies to incorporate additional historical market structure.
  • Pine Script®
    — Evaluates broader five-period market conditions, including directional displacement, body-to-range relationships, position within recent extrema and other multi-period structures.
  • Pine Script®
    ,
    Pine Script®
    ,
    Pine Script®
    and
    Pine Script®
    — Convert supported condition identifiers into human-readable explanations, making the selected trading logic easier to understand and inspect.
  • Pine Script®
    ,
    Pine Script®
    ,
    Pine Script®
    and
    Pine Script®
    — Display optional information panels describing the selected condition, its practical meaning and whether OHLC calculations are based on calendar-day or custom-session data.


Framework integration

The condition evaluators are designed to work with the OHLC framework through two shared data structures:

  • Pine Script®
    — Contains the current and previous Day/Session OHLC periods.
  • Pine Script®
    — Contains pre-calculated contextual values such as ranges, bodies, recent extrema and session-state information.


This architecture allows individual strategies to select and evaluate complex market filters without duplicating the underlying OHLC and contextual calculations.

Purpose

FT_TV_Cond is primarily intended as a shared condition-filtering dependency for other strategies. It separates reusable market-context conditions from the strategy's entry and trade-management logic, providing a consistent and modular filtering framework across multiple Pine Script® strategies.

Usage, attribution and intellectual property

This Pine Script® library is published open-source in accordance with TradingView's requirements for public Pine libraries.

Under TradingView's Script Publishing Rules, functions or code from a public Pine library may be reused in open-source publications without prior permission from the author. When publishing work that reuses this library, the original author must be properly credited in accordance with TradingView's rules.

Reuse of this library's functions or source code in a public Protected or Invite-only publication requires explicit permission from us.

The source code is provided under the license specified in the script header. TradingView's Script Publishing Rules govern reuse within the TradingView platform.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。