WEMOF-style BB 3-Sigma Stress Test — Strategy by mm_mitsuya

By mm_mitsuya

Performance Metrics

Description

This is an unofficial, educational stress test inspired by public descriptions of the WEMOF scalping method. It is not the original author's rules. The discretionary parts of the method cannot be coded, and every number below comes from my own interpretation of the public material.The question it asks is simple: if you build this kind of counter-trend, average-down scalper as carefully as possible, with every reasonable protection against ruin, does it still lose in the end?■ What it does- Fades closes beyond the 3-sigma Bollinger Band on USDJPY: short above the upper band, long below the lower band.- Skips moves that have an obvious reason (breaking the previous day's high/low, crossing a round number, spike bars, news hours).- Takes a very small profit (2 pips from the average price).- If price keeps going, it averages down up to three times, with a larger final add-on near the extreme.- A table on the chart counts results per position (all add-ons of one trade together), not per entry, and shows how many wins one loss erases.■ How it works- Bands: 20-period SMA ± 3 standard deviations of the close.- Purity: for the last 6 bars of the push into the band, purity = |net move| / total path travelled. 1.0 means a perfectly one-way move. Entries require purity >= 0.6, modelling the idea of fading only "clean" one-way pushes.- Skip rules (each can be turned off): - the push broke the previous day's high or low (daily values use the previous closed day, no repainting) - the push crossed a round number (0.50 JPY steps by default) - the push contains a bar whose range exceeds 3 x ATR(14), as a stand-in for headline moves - the bar falls inside user-defined news windows (default: 21:20-21:50 and 22:20-23:10 Tokyo time)- Averaging down: a new add-on every 10 pips against the position, up to 3 add-ons. Add-ons 1-2 use the base size, the final add-on uses 1.8 x the base size.- Exit: take profit 2 pips from the average price.- Ruin protection (added by me, the original method relies on not cutting losses): - hard stop 60 pips from the average price - daily loss limit of 3% of equity: everything is closed and trading stops for the day - no new entries on Friday after 22:00 Tokyo time, and everything is closed before the weekend - optional time stop (off by default)- Signals are evaluated on closed bars only.■ Default properties- Initial capital: 1,000,000 JPY (a typical retail account)- Order size: 10,000 units fixed (0.1 standard lot)- Pyramiding: 10 (only up to 4 entries are used: the first entry + 3 add-ons)- Commission: 0.001 JPY per unit per side, which equals about 0.2 pips per round trip. It stands in for the spread.- Slippage: 1 tick (applies to stop and market orders)- Margin: 4% for long and short (25x leverage, the Japanese retail limit)- calc_on_every_tick: off■ How to use1. Add it to USDJPY. It is published on the 15-minute chart; the original method uses 5 minutes, so test both.2. For long-term results, use Deep Backtesting. The report on the published chart uses the regular backtest range only, so its numbers will differ from the results below.3. Change "Max add-ons" to 0 to see the same idea without averaging down, or set "Hard stop" to 0 to remove the stop entirely.4. Read the table: - "One average loss = wins" shows how many average wins one average loss erases. - The last two rows split the P/L into positions that ended before the final add-on and positions that used every add-on.5. "Language" switches the table between English and Japanese. Every input is labeled in both languages.■ Results (Deep Backtesting, OANDA:USDJPY, default settings, Jan 2005 - Nov 2026)[15-minute chart]- Net profit: +31,772 JPY (+3.18% in about 22 years)- Max drawdown: 72,270 JPY (6.78%)- Profit factor: 1.066- Entries: 1,281 (win rate 79.39% per entry)- Positions: 967- Win rate per position: 97.8%- Longest win streak: 182 positions- Average win: +370 JPY / average loss: -15,176 JPY (one loss ≈ 41 wins)- Worst position: -28,988 JPY (≈ 78 average wins)- By exit: take profit +350,474 JPY (1,197 exits), hard stop -252,398 JPY (50), weekend close -66,304 JPY (34)- Positions that ended before the final add-on (933): +293,124 JPY- Positions that used every add-on (34): -261,352 JPY- Losing years: 2005, 2008, 2010, 2011, 2015, 2019, 2022, 2025. Hard-stop losses of about -29,000 JPY arrive every 2 to 5 years.[5-minute chart]- Net profit: -272,322 JPY (-27.23%)- Max drawdown: 382,136 JPY (35.13%)- Profit factor: 0.861- Entries: 5,284 (win rate 80.68% per entry)- Positions: 4,065- Win rate per position: 98.3%- Longest win streak: 266 positions- Average win: +284 JPY / average loss: -20,087 JPY (one loss ≈ 71 wins)- Worst position: -28,990 JPY- By exit: take profit +1,133,018 JPY (4,985 exits), hard stop -939,124 JPY (189), daily loss limit -380,876 JPY (61), weekend close -85,340 JPY (49)- Positions that ended before the final add-on (3,928): +967,730 JPY- Positions that used every add-on (137): -1,240,052 JPY- Costs: total commission was 104,152 JPY. Even with zero costs, the result would still be about -168,000 JPY.- Timeline: the equity curve stayed positive until 2011 (peak around +88,000 JPY in October 2010, still about +53,000 JPY at the end of 2011). It broke down in 2012-2014, when USDJPY trended up for years: -61,638 / -63,012 / -112,758 JPY. In a long trend, a 3-sigma touch is not an overshoot but part of the move.▼ Looks great for years. Then it isn't.[What the two tests show]- The win rate is real. Winning more than 97% of positions and streaks of 180-260 wins are normal.- The edge is not. Almost all of the profit is given back by a few dozen positions that run through every add-on.- The higher win rate on 5 minutes came with bigger losses, not a better result. A high win rate alone says nothing about whether a method works.- Protection helps survival, not profitability. With the hard stop, daily limit and weekend close, the 15-minute version barely broke even and the 5-minute version still lost more than a quarter of the account.■ Limitations- This is my interpretation, not the original method. Fundamental direction, headlines, hand-drawn support and resistance and the author's own judgment cannot be coded.- Purity, the skip rules, the add-on spacing and sizes are my substitutes for discretionary decisions.- Removing the hard stop (closer to the original idea of not cutting losses) makes the tail risk larger, not smaller.- Spread is modelled as a fixed commission. Real spreads widen at news and at the daily rollover.- Take-profit limit orders can fill at a better price on gaps, which slightly flatters the winning side.- Backtests do not guarantee future results.This script is for education only. It is not financial advice and not a trading system to use with real money.------------------------------------------------------------これは、WEMOFというスキャルピング手法について公開されている説明を参考にした、非公式の教育用ストレステストです。手法の考案者本人のルールではありません。手法の裁量の部分はコードにできず、以下の数字はすべて、公開情報を私なりに解釈した結果です。問いはシンプルです。この種の「逆張り+ナンピン」のスキャルピングを、破滅を避ける工夫を全部入れて、できるだけ丁寧に作り込んだら、それでも最後は負けるのか。■ できること- ドル円で、ボリンジャーバンドの3σの外で確定したら逆張りします。上のバンドの外なら売り、下のバンドの外なら買いです。- はっきりした理由のある動き(前日の高値・安値のブレイク、キリ番の突破、急な足、指標の時間帯)は見送ります。- 利確はごく小さく、平均建値から2pipsです。- 逆行が続いたら、最大3回までナンピンします。最後のナンピンは、高値・安値圏での大きなナンピンです。- チャート上の表は、エントリー単位ではなくポジション単位(1回の勝負のナンピンをまとめたもの)で結果を数え、負け1回が勝ち何回分を消すかを表示します。■ 仕組み- バンド:終値の20期間SMA ± 3標準偏差。- 純度:バンドに入るまでの直近6本について、純度=|実際に進んだ幅|÷通った道のり。1.0は完全な一方向の動きです。純度0.6以上のときだけエントリーし、「きれいな一方向の動きだけを逆張りする」という考え方を再現しています。- 見送り条件(それぞれオフにできます): - 前日の高値・安値をブレイクした動き(日足の値は確定した前日のものを使い、再描画しません) - キリ番(初期設定は0.50円刻み)をまたいだ動き - 値幅がATR(14)の3倍を超える足を含む動き(ヘッドラインによる動きの代わり) - 指定した指標の時間帯(初期設定は日本時間21:20〜21:50と22:20〜23:10)- ナンピン:ポジションと逆に10pips動くごとに追加し、最大3回。1〜2回目は基本サイズ、最後は基本サイズの1.8倍です。- 決済:平均建値から2pipsで利確。- 破滅対策(私が追加したものです。元の手法は損切りをしないことに頼っています): - 平均建値から60pipsの最終損切り - 1日の損失が資金の3%に達したら全決済し、その日は停止 - 金曜の日本時間22時以降は新規エントリーなし、週末前に全決済 - 時間切れ決済(初期設定はオフ)- シグナルは確定した足だけで判定します。■ 初期設定(Default properties)- 初期資金:100万円(一般的な個人の口座)- 注文サイズ:1万通貨固定- ピラミッディング:10(実際に使うのは最初のエントリー+ナンピン3回の最大4エントリー)- 手数料:片道1通貨あたり0.001円。往復で約0.2pipsになり、スプレッドの代わりです。- スリッページ:1ティック(逆指値と成行に適用)- 証拠金率:買い・売りとも4%(レバレッジ25倍、日本の個人向けの上限)- calc_on_every_tick:オフ■ 使い方1. ドル円に追加してください。公開は15分足ですが、元の手法は5分足なので、両方試してみてください。2. 長期の結果を見るには、ディープバックテストを使ってください。公開チャートのレポートは通常のバックテストの期間だけなので、下の結果とは数字が違います。3. 「Max add-ons」を0にするとナンピンなし、「Hard stop」を0にすると最終損切りなしで同じ考え方を試せます。4. 表の読み方: - 「負け1回=勝ち何回分」は、平均的な負け1回が、平均的な勝ち何回分を消すかを表します。 - 下の2行は、最後のナンピンの前に決着したポジションと、ナンピンを使い切ったポジションに損益を分けたものです。5. 「Language / 言語」で、表を英語と日本語で切り替えられます。設定項目はすべて英語と日本語で併記しています。■ 検証結果(ディープバックテスト、OANDA:USDJPY、初期設定、2005年1月〜2026年11月)【15分足】- 純損益:+31,772円(約22年で+3.18%)- 最大ドローダウン:72,270円(6.78%)- プロフィットファクター:1.066- エントリー数:1,281(エントリー単位の勝率79.39%)- ポジション数:967- ポジション単位の勝率:97.8%- 最長連勝:182- 平均の勝ち:+370円/平均の負け:−15,176円(負け1回≒勝ち41回分)- 最悪の負け:−28,988円(平均の勝ち約78回分)- 決済の種類別:利確 +350,474円(1,197回)、最終損切り −252,398円(50回)、週末決済 −66,304円(34回)- 最後のナンピンの前に決着したポジション(933回):+293,124円- ナンピンを使い切ったポジション(34回):−261,352円- 年間マイナスの年:2005、2008、2010、2011、2015、2019、2022、2025年。約−29,000円の最終損切りが、2〜5年に1回来ています。【5分足】- 純損益:−272,322円(−27.23%)- 最大ドローダウン:382,136円(35.13%)- プロフィットファクター:0.861- エントリー数:5,284(エントリー単位の勝率80.68%)- ポジション数:4,065- ポジション単位の勝率:98.3%- 最長連勝:266- 平均の勝ち:+284円/平均の負け:−20,087円(負け1回≒勝ち71回分)- 最悪の負け:−28,990円- 決済の種類別:利確 +1,133,018円(4,985回)、最終損切り −939,124円(189回)、1日の損失上限 −380,876円(61回)、週末決済 −85,340円(49回)- 最後のナンピンの前に決着したポジション(3,928回):+967,730円- ナンピンを使い切ったポジション(137回):−1,240,052円- コスト:手数料の合計は104,152円でした。コストをゼロにしても、結果は約−168,000円です。- 時系列:損益は2011年まではプラス圏で推移しました(ピークは2010年10月の約+88,000円、2011年末でも約+53,000円)。崩れたのは、ドル円が何年も上がり続けた2012〜2014年です(−61,638円/−63,012円/−112,758円)。長いトレンドの中では、3σへのタッチは「行き過ぎ」ではなく「動きの途中」になります。▼ 何年も「勝てる手法」に見える。そして崩れる。【2つの検証から分かること】- 勝率は本物です。ポジションの97%以上で勝ち、180〜260連勝も普通に起きます。- 優位性はありません。利益のほぼすべてを、ナンピンを使い切った数十回のポジションが吐き出しています。- 5分足のほうが勝率は高いのに、負けも大きくなりました。勝率が高いだけでは、手法が機能しているかどうかは分かりません。- 破滅対策は「生き残る」ためには効きますが、「儲かる」ことにはつながりません。最終損切り、1日の損失上限、週末決済を入れても、15分足はほぼ増えず、5分足は資金の4分の1以上を失いました。■ 注意点- これは私の解釈であり、元の手法そのものではありません。ファンダメンタルズでの方向判断、ヘッドライン、手で引くレジサポ、考案者本人の判断はコードにできません。- 純度、見送り条件、ナンピンの間隔とサイズは、裁量の判断を私が置き換えたものです。- 最終損切りをなくす(「損切りしない」元の考え方に近づける)と、裾のリスクは小さくなるのではなく大きくなります。- スプレッドは固定の手数料として再現しています。実際のスプレッドは、指標発表時や日をまたぐ時間帯に広がります。- 利確の指値は、窓開けのときに有利な価格で約定することがあり、勝ちの側を少しよく見せています。- バックテストの結果は、将来の成績を保証しません。このスクリプトは教育目的のものです。投資助言ではなく、実際のお金で使うための売買システムでもありません。

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView