LBR with HM Gartley 1935 on Log Returns Momentum Vol TargetOverview
Linda Bradford Raschke's Momentum-based strategy, made by conclusions from the book Profits in the Stock Market by H.M. Gartley in 1935, and uses log returns for directional bias as well as dynamic volatility targeting to maintain consistent risk exposure. Sizes positions inversely to realized volatility (from log returns std dev) for better compounding in trending markets like gold (XAUUSD).
Key Features
Log returns calculation: ln(close / close ) for time-additive momentum.
Directional signals: Enter long when momentum > 0, short when < 0 (configurable strict crossover mode).
Volatility scaling: Targets user-defined annual vol (default 20%) → reduces size in high-vol periods.
Exits: Percentage TP/SL + explicit close on opposite signals for reliable backtests.
Debug visuals: Momentum plot, signal shapes, real-time table (vol, size factor, qty, signal state).
How to Use
Best on Daily or higher timeframes for meaningful log momentum (e.g., XAUUSD, BTCUSD, stocks).
Adjust Momentum Lookback (default 50 bars), Target Vol %, TP/SL %.
Backtest with commissions/slippage enabled for realism.
Use on log-scale chart for % perspective.
Limitations & Notes
No guarantees of profitability; markets involve risk.
Designed for educational/quant purposes; test thoroughly.
Not financial advice.
Open-source for community learning.
Credits
Built on standard quant finance principles (log returns for normality/additivity, vol targeting for risk control). Inspired by discussions on compounding and GARCH-like vol estimation from Linda Bradford Raschke's conclusions from the book Profits in the Stock Market by H.M. Gartley in 1935.
Pine Script®策略






















