Dow Theory Market Structure Strategy by sikitank

By sikitank

Performance Metrics

Description

Dow Theory Market Structure Strategy turns the classic "trade with rising highs and rising lows" rule into a fully mechanical, backtestable system, so the claim can be checked with data instead of taken on faith.How it worksStructure: an uptrend is confirmed when the two most recent confirmed swing highs and swing lows are both rising (higher high & higher low). A downtrend is the mirror case. The trend is invalidated the moment price closes back through the most recent confirmed swing low (uptrend) / swing high (downtrend).Swing detection: standard bar-pivot method (Depth bars required on each side). Every swing used is confirmed before use — nothing is plotted or traded ahead of confirmation, so the script does not repaint.Entry (selectable): "Breakout" (default) enters on a close beyond the confirmed swing extreme once the higher-high/higher-low structure is in place. "Pullback" instead waits for price to retrace part of the most recent swing range and close back through that level before entering.Exit (single line used for both stop-loss and take-profit — no separate profit target): "Low-break" (default) trails the latest confirmed swing low/high. "ATR" (selectable) instead trails a fixed ATR multiple from entry. There is no own-data evidence yet that the ATR mode outperforms the default — it is offered for side-by-side comparison, not because it has been shown to be better.Position size: fixed notional = Margin input × Leverage input (defaults: 1,000,000 × 5 = 5,000,000, account currency), independent of running equity.Adjustable inputs: Depth (swing sensitivity) · Entry mode (Breakout / Pullback) · Exit mode (Low-break / ATR) · Margin · Leverage.Backtest disclosure (default settings — Depth=3, Breakout entry, Low-break exit; OANDA:USDJPY, 1H; 2023-01-05 – 2026-07-11; 343 closed trades; commission 0.01% per side):Win rate 36.4% | Profit factor 1.15 | Net profit +430,456 (+43.05% on 1,000,000 initial capital) | Max drawdown -338,991 (-26.48%).Long trades alone: 204 trades, 40.2% win rate, PF 1.35. Short trades alone: 139 trades, 30.9% win rate, PF 0.97 (a loser on its own over this period).This is a single symbol, single period, single parameter set — it has not been reproduced across other pairs, timeframes, or Depth values. A -26.48% drawdown is large relative to the margin/leverage settings above; at these defaults it would approach margin-call territory in live use. This script is an educational verification tool from an ongoing public research project comparing implementations of Dow Theory — it is not a proven trading edge. Past performance does not guarantee future results. Nothing here is investment advice.[日本語]「ダウ理論 Market Structure Strategy」は、「高値・安値の切り上げに順張りする」というダウ理論の考え方を、誰でも検証できる完全に機械的なルールに落とし込んだストラテジーです。仕組み構造判定:直近2つの確定スイング高値・安値がともに切り上がっていれば上昇トレンド成立(下降はその逆)。終値が直近確定安値を割った時点(上昇の場合)でトレンド無効化。スイング検出:前後Depth本のピボットで検出。使用するスイングはすべて確定済みのみで、リペイントしない。エントリー(選択式):「突破」(既定)=構造成立後、確定した直近高値/安値を終値で改めて抜けた瞬間。「押し目」=直近スイングの値幅を一定割合戻したのち、その水準を終値で回復した瞬間。撤退ライン(利確・損切りを分けず単一のラインで判定・選択式):「安値割れ」(既定)=直近確定安値/高値に追従。「ATR」=エントリー時のATR×倍率を初期距離としてトレール。自社データでATRが安値割れ方式を上回るという確認はまだ取れていないため、優劣を見比べるための選択肢として用意している。建玉サイズ:証拠金入力×レバレッジ入力の固定金額(既定:100万円×5倍=500万円)。運用中の損益に連動しない。変更できる項目:Depth(スイング感度)/エントリー方式/撤退ライン方式/証拠金/レバレッジバックテスト開示(既定設定=Depth3・突破・安値割れ/OANDA:USDJPY・1時間足/2023-01-05〜2026-07-11・確定343トレード/手数料0.01%片道):勝率36.4%|プロフィットファクター1.15|純損益+430,456円(初期資金100万円に対し+43.05%)|最大ドローダウン▲338,991円(▲26.48%)。ロング単体:204件・勝率40.2%・PF1.35。ショート単体:139件・勝率30.9%・PF0.97(単体では負け越し)。この結果は単一通貨ペア・単一期間・単一パラメータでの1本の記録であり、他の通貨ペア・時間足・Depth値での再現性は未確認です。最大ドローダウン▲26.48%は上記の証拠金・レバレッジ設定に対して重く、この設定のまま実運用すればロスカット水域に近づく規模です。本スクリプトはダウ理論の実装比較を行う公開検証プロジェクトの一環としての教育・検証目的のツールであり、確立された優位性を示すものではありません。過去の成績は将来の成績を保証しません。投資助言ではありません。

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView