Myth Busting E06 - MACD + 200 EMA + Support/Resistance [PyneSys] — Strategy by PyneSys
By PyneSys
Performance Metrics
- Author: PyneSys
- Symbol: COINBASE:ETHUSD
- Timeframe: 15 minutes
Description
This strategy trades pullbacks in the direction of the 200 EMA. It goes long when price is above the EMA, has tested a support level, and the MACD line crosses up through its signal line below zero. Shorts are the mirror image. The idea comes from TradingLab's video. We wrote this script ourselves, so you can test the rules on your own charts. The support and resistance levels come from our AutoSRZones library.How it works1. Trend: above the 200 EMA only longs are allowed, below it only shorts.2. Level test: price tests a support level (for a long) or a resistance level (for a short). A support test is a candle that reaches into the level's tolerance band and closes above the level. A resistance test is the mirror image.3. Signal: the MACD line crosses up through its signal line while it is below zero (long), or crosses down while it is above zero (short). The level test must have happened on or after the previous opposite MACD cross. The signal candle itself counts.4. Entry: a market order at the signal candle's close, so it fills at the next candle's open.5. Stop: at the 200 EMA's value on the signal candle. It goes out together with the entry.6. Target: 1.5 times the risk, measured from the real entry price to the stop. The real entry is only known once the order fills, so until then the target goes out with the entry, measured from the signal candle's close. At the entry candle's close it moves to 1.5 times the real risk. With "On order fill" switched on (see Chart and properties), it moves right after the fill instead.7. The trade ends at the stop or the target. One position at a time, and no new entry on the candle a trade closed on.Where we had to decideThe video teaches the rules clearly, but a script needs every detail fixed. Our choices:- The video says "200 day moving average", but its charts show a 200 EMA on the chart's own timeframe. We follow the charts.- "Below the zero line" means the MACD line is below zero on the candle of the cross (above zero for a short).- "Once the price hits the support, wait for the cross": the test must happen on or after the previous opposite MACD cross.- A "key" level is one where price turned clearly: the AutoSRZones library only starts a level from a peak that stood out by at least the minimum prominence, measured in ATR.- The target is measured from the actual fill, not from the signal candle's close. Only on the entry candle, with the default settings, does the script have to estimate it from that close.SettingsThe defaults are the rules as taught: MACD 12/26/9, a 200 EMA, a reward of 1.5 times the risk. The support and resistance settings are the AutoSRZones defaults: minimum prominence 10 ATR, tolerance band 1 ATR. We added these variants for research; change one at a time. No setting was chosen for its result.- Require a support/resistance test: switch it off for the two-filter version the video shows first (EMA and MACD only).- Test window: "Since the previous cross" (default) or "Last N bars", where the test must fall on the signal candle or one of the N - 1 candles before it.- Minimum prominence and tolerance band: fewer and stronger levels, or a looser test.- Stop beyond the EMA: moves the stop further away by a multiple of ATR(14). 0 puts it exactly on the EMA.- Reward-to-risk ratio and trade direction (both, long only, short only).Chart and propertiesThe video uses 15-minute crypto charts, and the script works on any symbol and timeframe. Load as much history as you can: the 200 EMA needs 200 candles, and the library needs some history before it finds its first levels.Properties: initial capital 10,000, 10% of equity per trade, no pyramiding, orders filled on the next candle.Script execution: "On order fill" is off by default, because TradingView's strategy report shows a lookahead warning whenever it is on. On historical candles, the extra run after a fill can see the candle's final high, low and close. This script does not use them there: right after a fill, its orders depend only on the fill price and the stop. Switch it on to place the target from the real entry while the entry candle is still running. With the default, the entry candle's prices are checked against the target estimated from the signal candle's close. A trade that reaches that level on its entry candle therefore ends at a result that can differ from 1.5 times the real risk. The difference is largest when the stop is very close to the entry. No new entry is taken on the candle a trade closed on, in either mode: with "On order fill", an entry placed after an exit would fill in the middle of that candle.When a stop and a target fall inside the same candle, TradingView's broker emulator assumes which one filled first; it does not see the ticks. Bar Magnifier can change those fills.On the chart: the 200 EMA in orange, the nearest support in green and the nearest resistance in red, triangles for signals, and the stop (red) and target (green) while a trade is open. The Data Window also shows the setup, level tests, MACD values and position.CostsCommission and slippage are zero by default, so the rules can be compared across very different markets before costs. That is not a claim that trading is free: these results are gross, not what you would keep. Set your own commission and slippage in Properties before you judge the results. Spread, funding and similar costs are not modeled. For this strategy costs matter: the stop sits at the 200 EMA, which is sometimes very close to the entry, so a fixed cost per trade can eat a large part of the risk.What this script is notThis description makes no performance claim, and no TradingView backtest is reported here. Our research ran the same rules in PyneCore on stored 15-minute data; those numbers are not this script's Strategy Tester output. Your results depend on the symbol, the data feed, the loaded history and your Properties. A short chart window holds few trades, and the win rate of a few hundred trades can swing by many percentage points. This is a research implementation, and past results do not predict future ones.How to use it1. Open a 15-minute chart, for example ETHUSD, and load as much history as you can.2. Add the strategy and keep the defaults to test the rules as taught.3. Set commission and slippage for your instrument and broker.4. With a 1.5 times risk target, the strategy needs to win 40% of its trades just to break even. Compare the win rate in the Strategy Tester with that, and look at how many trades it is based on.5. Check single trades: the level test, the MACD cross, the stop at the EMA and the target in the List of Trades.6. Try one variant at a time, for example the two-filter version without the support/resistance test.License: MPL-2.0. Copyright 2026 PyneSys LLC.