What Is This Indicator?
Timeseries-Driven Trading – TDT [AlgoFuego] is a precision-engineered, date-centric trading engine designed to explore patterns and strategies that are strictly tied to time, calendar behavior, and recurring market cycles. Rather than basing trade decisions on price dynamics, momentum, or oscillators, TDT emphasizes time-anchored entry and exit rules — making it ideal for seasonal studies, event-driven systems, and systematic historical analyses.
At its core, TDT is built around a simple yet distinct idea: time itself can be a valid signal generator. Instead of reacting to what price is doing, the engine reacts to when — triggering trades at predefined calendar dates, recurring yearly intervals, or controlled bar-count durations.
“A time-series framework that treats time itself as a signal — ideal for seasonal cycles, event-driven patterns, and recurring annual market behaviors.” — TDT Engine · AlgoFuego
The Core Philosophy: Time as the Signal
Most technical indicators respond to price. TDT is fundamentally different: it responds to the calendar. This allows traders to build strategies that test hypotheses such as:
- Seasonal market behaviors around specific calendar dates — holidays, end-of-month windows, earnings cycles
- Repeatable annual patterns tied to cyclical macro effects — election years, biennial economic cycles
- Event-related timing strategies where historical dates are used as recurring trade signals across multiple years
This makes TDT an ideal tool for analysts who view markets not just as price graphs, but as time-series phenomena with embedded rhythms and seasonality.
How the Engine Operates
The TDT indicator integrates several key components to offer a systematic, time-based testing environment:
1. Time-Based Entry Rules
Trades can be triggered according to three distinct modes:
- Specific Calendar Dates — fixed day and month combinations that fire on every matching bar in history
- Current Date Behavior — where entries align with the present date for live forward-testing
- Year Filters — selections of All Years, Odd Years, or Even Years to capture recurring biennial or multi-year cycles
This allows traders to build strategies that mimic seasonal, macro, or recurring annual patterns without relying on any form of price pattern recognition.
2. Flexible Exit Strategies
Exits can be defined using either of two independent mechanisms:
- Calendar Date Exit — allowing tight control over when trades close based on the time of year, ideal for fixed seasonal windows
- Bar-Count Exit — where a trade is automatically closed after a set number of bars from entry, supporting consistent duration-based holding periods
Built-In Trade Engine
Beyond scheduling, TDT includes a complete trade management framework that operates automatically alongside the time-based signal logic:
- Stop-Loss Control — Toggle on/off with a percentage distance from entry price. The level renders visually on the chart as a labeled line, and is factored into all backtesting calculations.
- Take-Profit Control — Define a target profit percentage for automatic trade closure at the desired level.
- Commission Simulation — Input separate entry and exit commission percentages. All profit/loss and compound return calculations adjust automatically to reflect realistic trading costs.
- Long & Short Simulation — Run the engine independently in Long or Short mode to evaluate how timing logic performs in both directions.
Backtesting & Performance Analytics
A comprehensive on-chart performance table renders directly on the TradingView chart, summarizing all completed trades with the following metrics:
- Signal Type — Displays the active backtest configuration (Trade Side + Entry Mode → Exit Mode)
- Number of Trades — Total trades executed, broken down by wins and losses
- Returns — Maximum, minimum, and average return per trade
- Win Rate — Percentage of profitable trades across the full backtesting period
- Compound Return — Compounded equity growth across all trades, displayed both before and after commission
- Bars Left — How many bars remain until the current open trade reaches its defined exit point
Visual Trade Mapping
TDT makes every trade event visible directly on the price chart through a layered visual system:
- Trade Markers — Entry, exit, stop-loss, and take-profit levels appear as clearly labeled lines on the chart at each trade event
- Candle Coloring — Bar colors automatically shift to reflect the active trade state: Bullish (Long trades), Bearish (Short trades), or Neutral (no active position)
- Customizable Appearance — Label sizes (from Tiny to Huge), colors for each level, and table positioning are fully adjustable without code editing
These visual tools make it straightforward to see when each trade was opened and closed, how long it remained active, and how it performed relative to the time signal that triggered it.
Alert System
Four independent real-time alert types can be enabled or disabled individually, ensuring you receive only the notifications relevant to your current strategy:
- Entry Alert — Triggers when a new trade entry signal is generated by the active configuration
- Exit Alert — Triggers when the position is closed by a calendar date or bar-count exit signal
- Stop-Loss Alert — Triggers when price reaches the defined stop level
- Take-Profit Alert — Triggers when price reaches the defined target level
How to Use: Step-by-Step
Follow this sequence to implement the indicator correctly from the first session:
- Step 1 — Select Trade Side. Choose Long or Short depending on the market direction you want to simulate.
- Step 2 — Set Entry Rules. Select Specific Date (day + month + optional year filter: All, Odd, or Even years) or Current Date mode.
- Step 3 — Set Exit Rules. Choose Specific Date exit or Bar Count exit. For Bar Count mode, define the number of bars to hold the position.
- Step 4 — Configure Risk Management. Enable Stop-Loss and Take-Profit with percentage inputs. These levels display visually and feed into all backtesting calculations.
- Step 5 — Enable Trade Visualization. Toggle on Entry/Exit level markers and colored bars for a full visual audit trail across history.
- Step 6 — Set Up Alerts. Activate real-time notifications for Entry, Exit, Stop-Loss, and Take-Profit events individually through TradingView's alert system.
- Step 7 — Run the Indicator. Once activated, trade markers, colored candles, and the statistics table appear automatically — no manual interaction required.
- Step 8 — Review the Statistics Table & Optimize. Analyze the performance panel — win rate, max/min/average returns, compound return, and bars left — then iterate on entry dates, year filters, and exit modes to find an optimal seasonal configuration.
Who Should Use It?
Timeseries-Driven Trading is particularly suited for:
- Seasonal traders seeking a rigorous, data-driven framework for testing calendar-based market behaviors
- Quantitative analysts who want to isolate the pure impact of timing on returns — independent of price-action noise
- Event-driven researchers building hypotheses around recurring annual dates, macro cycles, or historical recurrence
- Risk-conscious systematic traders who require full commission modeling and risk management integration within their backtesting workflow
Technical Specifications
- Platform: TradingView
- Language: Pine Script v6
- Supported Assets: Forex, Crypto, Stocks, Commodities, Indices
- Timeframes: All timeframes (Daily and above recommended for seasonal studies)
- Entry Modes: Specific Date · Current Date
- Exit Modes: Specific Date · Bar Count
- Year Filters: All Years · Odd Years · Even Years
- Backtesting Modes: Long & Short simulation
- Risk Controls: Stop-Loss % · Take-Profit %
- Commission Simulation: Entry % + Exit % (individually configurable)
- Alert Types: Entry · Exit · Stop-Loss · Take-Profit (individually toggleable)
- Performance Table: On-chart, fully customizable position and appearance
- Last Updated: January 2025
Important Disclosure
Timeseries-Driven Trading [AlgoFuego] is a technical analysis and strategy testing tool — not a guaranteed profit system. While time-series models can highlight historical timing tendencies and seasonal patterns, markets are influenced by countless variables beyond calendar effects alone. Past performance, seasonal behavior, or backtested results do not guarantee future outcomes. Always evaluate additional factors, apply sound risk management, and make independent trading decisions.