Version 2.0 2025.09.18
Core Differences (v1.0 → v2.0)
1) Time base / engine

Before (v1.0): Second-based TPS (ticks-per-second). It recorded every tick, counted ticks over the last TPS_Period seconds, and looked for “spikes” vs. an average. Flow: RecordTick → CalculateTPS/CalculateAverageTPS → CheckForSignal.

Now (v2.0): Minute-based (M1). Activity = sum of M1 tick-volume windows (e.g., 3 bars = 3 minutes). Statistical filter: Z-Score + backup multiplier + percentile (so you still get signals in quiet regimes).

Effect: No dependency on per-second data; Open Prices Only compatible; less noise, more stable optimization.

2) Signal stack (gates)

Before: TPS spike × Indecision (tight box) × Momentum (min body & max wick/body).

Now:

Activity (Z-Score / Percentile) →

Indecision Box (PIPS or ATR-based) →

Momentum or Breakout Close (close X pips beyond the box) →

(optional) Retest Entry (touch back within N bars) →

Align with Trend filter.

Effect: More entry opportunities (especially Breakout/Retest) and better coverage in low-vol regimes via the percentile gate.

3) Trend & Session filters

Before: None.

Now: EMA trend filter (e.g., M5/EMA50) + three sessions (Asia/London/NY) by server time.

Effect: Keeps you trading with the trend and lets you open/close sessions to modulate frequency.

4) Indecision definition

Before: Fixed pip range using the last N M1 bars.

Now: Switchable: PIPS or ATR × Multiplier. The box height adapts to volatility.

Effect: More balanced boxes and breakouts—neither too tight in high ATR, nor too loose in low ATR.

5) Entry triggers

Before: Only if a momentum candle formed (solid body, short wicks).

Now:

Momentum (as before),

Breakout Close (enter on a close outside the box, no wick/body check),

Retest Entry (a second chance if price retests the box boundary within N bars).

Effect: Many more trades on trend days and range breaks.

6) Exits & risk management

Before: Fixed SL/TP off the box, + Max_Trade_Duration auto-close; margin/stop-level checks lived in ExecuteBuy/Sell.

Now:

Partial Take-Profit (R-based trigger & percent),

Break-Even (offset pips),

Trailing Stop (R-triggered, pip distance),

Targets in R-multiple (TP = R × risk).

Effect: Lock in gains, capture more of the right tail, and reduce drawdowns during loss streaks.

7) OPO compatibility & architecture

Before: Logic ran every tick, with second-level TPS counters.

Now: Fires only on new M1 bar open (OPO-friendly). NewBarM1() gates all signal/exit logic at bar open.

Effect: More reliable backtests and reduced intrabar/repaint issues.

8) Order placement & volume

Before: ExecuteBuy/Sell(lot, entry, sl, tp) with explicit entry price and SL/TP min-distance fixes.

Now: trade.Buy/Sell(vol, 0.0, sl, tp); volume normalized to min/step; broker fills entry.

Effect: Simpler code. If your broker enforces large StopLevel distances, consider a slightly bigger buffer on SL/TP (we can re-add the auto-adjust if you want).

9) Inputs / UX

Before: Mixed/technical names; second-based TPS inputs (TPS_Period, TPS_Multiplier, etc.).

Now: English, customer-friendly names in PascalCase_with_Underscore, grouped clearly: Activity, Box, Momentum, Entry Logic, Trend, Session, Risk, Exits, General.

Effect: Cleaner panel; optimization scenarios are easier to set up (e.g., Activity_Window_Minutes, Activity_Past_Windows, Activity_ZScore_Threshold, Box_ATR_Multiplier, …).

10) Single-position mode & state

Before: Simple position sweep; closed by iterating everything.

Now: Magic-scoped single-position policy (no clashes) + state for retests (direction/level/countdown).

Effect: Fewer conflicting signals; the retest window is handled disciplined and deterministic.

Why does v2.0 generate more trades?

Percentile gate: If Z-Score is not enough, an activity that exceeds the Xth percentile of past windows still passes.

Breakout Close: Immediate entries on closes outside the box—no momentum wick/body requirement.

Retest Entry: A second ticket if price retests the boundary within N bars.

ATR-based box (optional): Volatility-adaptive, so you avoid overly tight/loose boxes.

Session expansion (optional): Opening Asia adds overnight flow if London+NY isn’t enough.

Small but important notes

The v1.0 block that nudged SL/TP to satisfy broker StopLevel was removed for simplicity in v2.0. If your broker has strict minimum distances, add a few pips of buffer (we can re-enable the auto-adjust if you like).

With OPO, all decisions are made at bar open. It may enter a bit later than tick-intraday logic, but backtests are far more trustworthy.