← All strategy tests
Historical simulationStocks30m barsLong + shortMixed holding periods

MACD Signal Cross

Simulated historical strategy test for AAPL.US using 30-minute bars from 2026-08-15 to 2026-10-11. Asset class: stocks. Indicators and functions used: CROSSED, MACD_LINE, MACD_SIGNAL; Box 1 condition: [CROSSED(input_col=MACD_LINE(close, 12, 26, 9), input_col2=MACD_SIGNAL(close, 12, 26, 9), direction=above)]; Box 2 condition: [CROSSED(input_col=MACD_LINE(close, 12, 26, 9), input_col2=MACD_SIGNAL(close, 12, 26, 9), direction=below)]. Long and short. Fills at the next bar's open. Opposite signal reverses the position. Starting equity: 10,000. Position size: 100 % of equity. Stop loss: 1.5 ATR. Take profit: 3 R. Trailing stop: not set. Commission per side: 0.01 %. Slippage per fill: 0 points. Move stop to breakeven at 1 R. Risk-setting ATR period: 14. Session: 09:30 to 16:00 (exchange time). Saved results. Trades: 40; Net P&L: 130.401615; Return: 1.304016%; Win rate: 27.5%.

Shared by pk78 · Published 2026-10-15 · Snapshot 2026-10-15 · Report revision 2

Test your versionLoads these rules and settings. Review them before starting a new test.

What was tested

Market
AAPL.US
Timeframe
30-minute bars
Test window
2026-08-15 – 2026-10-11
Engine
tv-engine-3

Simulated historical results, not live trading performance. Historical results do not predict future returns. Shared sections are selected by the author; hidden sections have not been independently verified. The author controls which sections are visible. This is a saved result; market data revisions or engine updates can change a later rerun.

Result and evidence

Inconclusive

Up $130.40, but that could easily be luck: a strategy with no real edge and trades this variable would do this well about 41% of the time, and without its 2 best trades it loses $448.63. Test a longer period before trusting it.

Net P&L
130.40
Return
1.30%
Trades
40
Win rate
27.5%
Profit factor
1.08
Maximum drawdown
-4.80%
Average trade
3.26
Average R
0.08R
Sharpe ratio
0.71
Commission paid
78.44
Chance a no-edge strategy does this well
41.4%
P&L without the 2 best trades
-448.63

Read before trusting the numbers

  • 4 stop exits filled at the open because price gapped past the stop, so they closed beyond the stop price (worst -1.49R).
  • Buy & hold returned 10.01% over the same period, more than this strategy's 1.3%.
  • A trade was still open at the end of the test and was closed at the last price.

The luck check is a statistical estimate for this sample, not the probability of future success. Costs, sample size and testing many variants affect how much confidence a result deserves.

Equity and drawdown

Saved simulated equity across this test window. Drag the range control to inspect a period.

Full performance statistics

Compare the full run with its long and short trades.

Statistics from the saved run, for All, Long and Short trades. N/A means unavailable or not applicable.
MetricAllLongShort
Performance
Net P&L130.40392.54-262.14
Return on starting equity1.30%N/AN/A
Profit factor1.081.610.73
Average trade (expectancy)3.2619.63-13.11
Average R per trade0.08R0.31R-0.15R
Total R3.27R6.24R-2.97R
Buy & hold return (same period)10.01%N/AN/A
Trades
Trades402020
Win rate27.50%35.00%20.00%
Average win158.56147.57177.80
Average loss-55.65-49.27-60.83
Average win / average loss2.853.002.92
Largest win322.67322.67256.36
Largest loss-94.18-86.42-94.18
Most wins in a row321
Most losses in a row746
Average bars in trade8.688.758.60
Average time in trade19h 2m17h 2m21h 3m
Average adverse excursion (MAE)53.4144.4262.40
Average favorable excursion (MFE)81.2591.4771.03
Risk
Max drawdown-486.73N/AN/A
Max drawdown %-4.80%N/AN/A
Longest drawdown20d 1hN/AN/A
Sharpe ratio (daily, annualized)0.71N/AN/A
Sortino ratio (daily, annualized)0.91N/AN/A
Time in the market62.72%N/AN/A
Costs
Commission paid78.4439.1839.26
Same-bar exits assumed stop-first0N/AN/A
Luck check
Chance a no-edge strategy does this well41%N/AN/A
Net P&L without the 2 best trades-448.63N/AN/A

N/A means the metric is unavailable or does not apply to that side. Colors describe individual metrics, not the reliability of the strategy.

Strategy rules

Entry / long entry

[CROSSED(input_col=MACD_LINE(close, 12, 26, 9), input_col2=MACD_SIGNAL(close, 12, 26, 9), direction=above)]

Exit / short entry

[CROSSED(input_col=MACD_LINE(close, 12, 26, 9), input_col2=MACD_SIGNAL(close, 12, 26, 9), direction=below)]

Execution and risk settings

Direction
Long and short
Signal mode
Long and short entries
Order fills
Next bar's open
Opposite signal
Reverse position
Starting equity
10,000.00
Position size
100.00 % of equity
Stop loss
1.50 ATR
Take profit
3.00 R
Trailing stop
Not set
Move stop to breakeven at R
1.00
Maximum bars in trade
Not set
Flat at session end
No
Commission per side
0.01 %
Slippage per fill
0.00 points
Session
09:30 – 16:00 (exchange time)

Simulated trades

40 trades in this snapshot. All times are UTC.

#SideEntryExitSizeEntry priceExit priceNet P&LExit reason
1.0Short2026-08-17 14:30:002026-08-17 19:30:00-32.00304.5100306.1500-54.43reverse_signal
2.0Long2026-08-17 19:30:002026-08-18 14:35:0032.00306.1500311.0400154.50take_profit
3.0Short2026-08-19 18:30:002026-08-20 13:30:00-32.00314.8400317.4550-85.70stop_loss
4.0Long2026-08-24 14:30:002026-08-24 19:45:0032.00312.9300310.5800-77.20stop_loss
5.0Short2026-08-25 14:00:002026-08-26 13:30:00-32.00310.4600310.4600-1.99breakeven_stop
6.0Long2026-08-26 14:00:002026-08-27 13:30:0031.00312.4650310.5450-61.45breakeven_stop
7.0Short2026-08-27 14:30:002026-08-27 14:40:00-31.00310.8000313.1500-74.78stop_loss
8.0Long2026-08-27 15:30:002026-08-27 19:00:0031.00314.6550313.8700-26.28reverse_signal
9.0Short2026-08-27 19:00:002026-08-28 13:30:00-31.00313.8700316.8450-94.18stop_loss
10.0Long2026-08-28 14:00:002026-08-28 19:30:0030.00316.7700319.550081.49reverse_signal
11.0Short2026-08-28 19:30:002026-08-31 16:30:00-30.00319.5500313.4600180.80take_profit
12.0Long2026-09-01 14:00:002026-09-02 14:30:0030.00322.6950324.585054.76reverse_signal
13.0Short2026-09-02 14:30:002026-09-03 14:10:00-30.00324.5850327.5400-90.61stop_loss
14.0Long2026-09-03 14:30:002026-09-03 18:00:0030.00329.7150326.9000-86.42reverse_signal
15.0Short2026-09-03 18:00:002026-09-04 15:00:00-30.00326.9000318.2900256.36take_profit
16.0Long2026-09-08 19:30:002026-09-09 14:10:0031.00315.8001315.8001-1.96breakeven_stop
17.0Short2026-09-09 15:30:002026-09-09 17:00:00-32.00312.5000314.0050-50.16reverse_signal
18.0Long2026-09-09 17:00:002026-09-09 17:15:0031.00314.0050311.7300-72.46stop_loss
19.0Short2026-09-09 17:30:002026-09-09 17:55:00-31.00311.7400314.2800-80.68stop_loss
20.0Long2026-09-09 18:00:002026-09-09 18:10:0031.00313.2550310.5400-86.10stop_loss
21.0Short2026-09-09 18:30:002026-09-09 18:45:00-31.00312.1350315.0800-93.24stop_loss
22.0Long2026-09-09 19:00:002026-09-11 13:30:0030.00316.6800327.5000322.67take_profit
23.0Short2026-09-11 19:00:002026-09-16 13:30:00-30.00332.5114332.5114-2.00breakeven_stop
24.0Long2026-09-16 14:00:002026-09-16 19:10:0029.00334.1000331.7200-70.95stop_loss
25.0Short2026-09-16 19:30:002026-09-17 13:30:00-29.00331.6000334.7700-93.86stop_loss