FT_TV_Cond

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
- — 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® andPine 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® andPine 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.Pine Script®
Framework integration
The condition evaluators are designed to work with the OHLC framework through two shared data structures:
- — 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.
Pine Script®
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.
Библиотека Pine
В истинном духе TradingView автор опубликовал этот код Pine как библиотеку с открытым исходным кодом, чтобы другие программисты Pine из нашего сообщества могли её использовать. Браво автору! Вы можете использовать эту библиотеку для личного пользования или в других публикациях с открытым исходным кодом, но повторное использование этого кода в публикациях регулируется Правилами поведения.
Отказ от ответственности
Библиотека Pine
В истинном духе TradingView автор опубликовал этот код Pine как библиотеку с открытым исходным кодом, чтобы другие программисты Pine из нашего сообщества могли её использовать. Браво автору! Вы можете использовать эту библиотеку для личного пользования или в других публикациях с открытым исходным кодом, но повторное использование этого кода в публикациях регулируется Правилами поведения.