TradeViora AcademyLearn. Analyze. Practice. Trade Smarter.
Menu

FREE FINANCIAL EDUCATION

Signal generation

Distinguish a persistent condition from a one-time crossing event.

0%

What you will learn

Prerequisites: Rolling indicators, boolean conditions and data availability timestamps.

Mechanism and decision rules

A signal rule turns available features into a desired position or order event. “Close above average” is a persistent condition; “close crosses above average” requires the prior relationship to be at or below and the current relationship above. Confusing these can generate repeated entries. Specify whether the output is a target position, a change in position or a new order request.

Rolling features need enough historical observations. A twenty-bar average cannot be treated as fully formed after only three bars unless that is the explicit definition. Use completed bars and shift fills according to the chosen execution mechanism. For a close-derived signal, the next executable quote or opening price is often a more defensible assumption than buying at the same close that created the signal.

Worked example · synthetic data

Synthetic closes are 98, 100, 102 and 104. After the first three bars, the three-bar average is 100 and the close is 102, so the condition is above average. At the fourth bar, average is 102 and close is 104, so the condition remains true; it is not a new crossing from below.

A strategy already long should not add another position unless pyramiding is explicitly allowed. If the first valid crossing is observed at a daily close of ₹102 and the next open is ₹105, a next-open model enters at ₹105. Reporting the ₹102 signal price as a fill overstates execution quality.

Failure modes and limits

Intrabar indicators can change before the bar closes. Repainting pivots and centered averages may use future values. A vectorized backtest can accidentally use today’s final feature to execute at today’s open. Test the timeline with a small hand-worked sequence before trusting a large result table.

Practice case

Yesterday’s close was 50 with average 51. Today’s close is 53 with average 52. The next session opens at 54. Is there an upward cross, and what fill belongs in a declared next-open simulation?

Reveal the worked answer

Yes: the prior close was below its average and the current close is above its average. The signal is known after today’s close. A next-open simulation uses 54, subject to its spread, slippage and liquidity model, not the observed close of 53.

Check your understanding

What extra information distinguishes a crossing from an above-average condition?


Explanation

A crossing requires a transition from the prior side, not merely the current state.

A close-generated signal with next-open execution should fill at which price?


Explanation

Signal observation and executable order timing must be kept separate.

What can a centered moving average introduce?


Explanation

Centered windows generally include later data, making them unsuitable as-is for causal trading signals.

Sources and next steps

The lesson, calculations and synthetic cases are original educational material. References explain underlying contract or chart conventions; none validates the profitability of a trading rule. Actual contract specifications, settlement obligations and charges must be checked before trading.

Explore OHLCV data in the chart lab · Explore volume-at-price and TPO data · Practice library