Confluence x4 Signal Test Bench — Strategy by dead_signals_lab

By dead_signals_lab

Performance Metrics

Description

Confluence x4 Signal Test Bench is a strategy for testing entry signals, not a strategy to follow. It answers one question: does an entry trigger beat random entries when both use the same exits and the same costs?WHY IT IS DIFFERENTMost published strategies report one equity curve and leave the reader to guess how much of it is signal and how much is luck. This script puts a random-entry control on equal footing with four indicator triggers: the same exit rule, the same position size, the same commission and slippage, the same date range. Only the timing of the entry changes. It also lets you switch on one confluence filter at a time (ablation), so you can see what each component adds instead of judging the whole stack at once.HOW EACH COMPONENT IS CALCULATED All conditions are evaluated on the close of the bar; orders fill at the open of the next bar.MA Cross trigger: the 20-period SMA crosses the 80-period SMA, with ADX above 20 (DMI length 15, ADX smoothing 90). Long crosses also require RSI(20) below 60; short crosses require RSI(20) above 40.Trifecta trigger: the first bar on which RSI(14) > 50, the MACD line (12, 26) > 0 and the 20-period Chaikin Money Flow > 0 are all true at once (mirror conditions for shorts).MT-Stoch trigger: a score from -5 to +5 built from five votes: three stochastics (20/12/12, 10/6/6 and 5/3/3, K versus D), a stochastic RSI oscillator (RSI 13, range 5, smoothing 8) above 20 or below 80, and the 100-bar percentile rank of the stochastic RSI K/D ratio. The trigger fires on the first bar the score reaches the threshold (default 3; -3 for shorts).MCU trigger: a score from -9 to +9 built from nine votes in three groups: Ichimoku-style structure (20/60/120 periods, cloud displaced 30 bars back, price versus cloud, conversion versus base line, price versus 30 bars ago), ATR expansion (14-period ATR relative to its 50-period average, plus price versus the 20 EMA), and a Bollinger/Keltner squeeze with linear-regression momentum. The trigger fires on the first bar the score reaches the threshold (default 7; -7 for shorts).Random (control): on each bar, a seeded pseudo-random number opens a long (or short) with the probability you set (default 2% per bar). The same seed reproduces the same entries on historical bars.Filters: each filter requires that component to be in its bullish state (bearish for shorts) at the moment of the trigger. With all filters off, only the trigger decides.Exits: Fixed bars (default, 10 bars), Opposite signal, ATR stop and target (2 and 3 times the 14-period ATR), or RSI(14) crossing 80/20. Fixed bars is the default because it gives every entry, the random one included, the same holding period, which is the cleanest way to ask whether the entry carries information.The background color marks bars on which all four components agree; it is visual only and does not affect trades.DEFAULT PROPERTIES (used for the published report)Initial capital: 10,000.Order size: 10% of equity per trade, no pyramiding.Commission: 0.05% per order, a typical retail cost for liquid stocks, ETFs and index CFDs. Adjust it to your instrument.Slippage: 2 ticks per order.Margin: 100% for longs and shorts, that is, a cash account without leverage.The strategy does not recalculate on every tick or after order fills.Date range: from 2018-01-01. Trigger: MT-Stoch. Mode: Both (long and short). Exit: Fixed bars, 10.MT-Stoch is the default trigger because it fires often enough to give a meaningful sample on daily charts. MA Cross and MCU fire much less often; with them, use a lower timeframe or a longer date range to reach a comparable number of trades.The report shown with this publication uses these defaults on SPY, daily timeframe, and contains more than 100 trades.HOW TO USE THE RANDOM CONTROLKeep the exit on Fixed bars and keep the costs on.Run your trigger and note the result and the number of trades.Switch the trigger to Random (control), adjust the entry probability until the trade count is similar, and run several seeds (for example 42, 43, 44...).Compare. If your trigger's result falls inside the range of the random runs, it is indistinguishable from chance on that chart and period.LIMITATIONSOne instrument and one history at a time. A result that survives the random control is a reason to test further, not evidence of an edge, because the history has already been looked at.The random control is reproducible on historical bars for a given seed; on real-time bars new random draws occur.The Ichimoku-style component uses values displaced 30 bars into the past only; no plot is shifted into the future.Costs are approximations; spreads, financing and borrow fees are not modeled.Nothing here is investment advice.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView