Strategy · Pine Script v6 · On the chart

Futures Compounding Machine

by majohnst

This strategy applies Gann swing lane signals to generate entries in micro futures instruments.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code1,298
Settings40inputs
LicenceNone stated
Last update4 months ago1 Jul 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Futures Compounding Machine enforces compounding risk controls that scale take-profit targets upward after wins and downward after losses using configurable ratios. Additional risk management includes max daily loss halts, consecutive loss limits, and time-of-day trading windows. Before each entry it performs a risk-reward check against minimum thresholds. The strategy draws signals, labels, and status messages directly on the price chart. It supports auto-instrument configuration for multiple futures contracts and exits at fixed dollar-based take-profit targets rather than waiting for opposing signals.

Details

Published by

majohnst on GitHub

Draws

On the price chart

Markets

Indices

Timeframes

M15-H1, H4 and above

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Auto-Configure by InstrumentbooltrueautoConfig
Contracts per Tradeint1contracts
Enable Auto Position SizingbooltrueuseAutoSize
Scale Up Every ($) [auto-config OFF only]float50.0sizeUpEvery
Scale Down Every ($) [auto-config OFF only]float50.0sizeDnEvery
Max Additional Contracts [auto-config OFF only]int3sizeMax
Trade DirectionstringBothtradeDir
Manual Day Bias (type bull / bear / neutral / both / blank)stringmanualBiasText
Neutral Bias = Allow Both DirectionsbooltrueneutralTrades
Use Embedded Apex Trend Signal (overrides Manual)boolfalseuseApexBias
Trend Reference Symbol (blank = current chart)symbolapexSymbolInput
Apex Signal ModestringTrend (Adaptive MA)apexModeInput
Show all 40 settings
SettingTypeDefaultVariable
Apex Lookback Periodint20apexLen
Apex Signal TimeframetimeframeDapexTimeframe
Max Daily Loss ($)float35.0maxDailyLoss
Max Consecutive Lossesint3maxConsecLosses
Max Consecutive Loss Daysint2maxConsecDays
Initial Trade Profit Target ($)float35.0initTradeProfit
Fallback Compound Ratiofloat1.1compoundRatio
Reset TP Target Each DayboolfalseresetTpDaily
Max Loss Per Trade ($)float70.0maxLossPerTrade
Minimum TP Floor (% of Initial Target)float40.0minTpPct
Enable Morning 07:00 - 11:00 CTbooltrueuseWin1
Morning Compound Ratiofloat1.15win1Ratio
Enable Midday 11:00 - 13:00 CTboolfalseuseWin2
Midday Compound Ratiofloat1.0win2Ratio
Enable Afternoon 13:00 - 16:00 CTbooltrueuseWin3
Afternoon Compound Ratiofloat1.05win3Ratio
Enable Late Day 16:00 - 17:00 CTboolfalseuseWin4
Late Day Compound Ratiofloat1.0win4Ratio
Enable Pivot StopbooltrueuseStopLoss
Pivot Buffer (x ATR)float0.25pivotBuffer
Enable Auto BreakevenboolfalseuseBreakeven
Breakeven Trigger (x ATR)float2.0beTriggerMult
Breakeven Buffer (x ATR)float0.5beBuffer
Breakeven Dollar Floor ($)float15.0beFloorDollars
Enable R:R GatebooltrueuseRRGate
Min Reward:Risk Ratiofloat1.5rrMin
Enable Trend FilterbooltrueuseTrendFilter
Trend EMA Lengthint20trendLen
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

257 stars

Donald - Test Logic Futures is an overlay strategy designed for intraday futures trading. It combines kernel regression functions with exponential moving averages to evaluate price retracements and entry timing. Trades are filtered by session execution windows

Strategy v5 TrendMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of Donald - Test Logic Futures
106 stars

This strategy trades the three-candle strike pattern filtered by trend direction and time sessions. It calculates market regime using linear regression and exponential or smoothed moving averages to distinguish between ranging and trending conditions. Risk man

Strategy v5 Candlestick patternsTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 3 Candle Strike Strategy
53 stars

This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

ATOM 1m scalp HK

by dearvn
43 stars

This overlay strategy targets one-minute ATOM scalps. It tracks pivot highs and lows as resistance and support, compares a three-period EMA with a multi-stage smoothed close, and flags long or short when price crosses that curve in the matching direction. Dail

Strategy v5 ScalpingSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of ATOM 1m scalp HK
23 stars

This strategy evaluates breakout and trend opportunities on the price chart using a weighted composite score of volume, trend, and candlestick structure. It tracks volume spikes, fast and slow EMAs, higher-timeframe EMA trend alignment, opening ranges, and ses

Strategy v6 TrendVolume Repaints
Updated 4 weeks ago · Custom licence GitHub repository of TradingAlpha Point-Clip Strategy

More Trend scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers