Combined Supertrend steigt in Trendrichtung ein, wenn der Tagesschlusskurs gleichzeitig über (oder unter) drei verschiedenen Trendlinien liegt. Außerdem müssen die ATR-Linie und die Prozentlinie zwei bars lang mehr als 7 Punkte auseinanderliegen. Trades werden geschlossen, wenn diese beiden Linien wieder zusammenlaufen oder der Kurs alle Linien zurückkreuzt.
Bester Durchlauf von 3. USD/JPY, Täglich, Spread 1, aus Durchlauf sweeps:2026-09-16-USDJPY-D-opt.tsv:2.
| Zeitraum | Bis 2026-09-16 |
| Instrument | USD/JPY, Täglich |
| Spread | 1 Punkt |
| Kontrakte | 1 |
| Startkapital | 1,000,000 |
| Kosten | Nur Spread. Kommissionen und Overnight-Finanzierung sind nicht enthalten. |
| Bars | Bis zu 200,000 Bars, weniger wo das Instrument weniger Historie hat |
| Zuletzt getestet | 2026-09-16 |
| positionSize Kontrakte pro Trade | 1 |
| lookbackPeriod Fenster für die ATR-Trendlinie | 21 |
| atrMultiplier ATR-Vielfaches für die ATR-Trendlinie | 3 |
| pctStopFactor Abstand des prozentualen Supertrend, als Anteil des Close | 0.005 |
| rsqPeriod R-Quadrat-Fenster für den adaptiven Supertrend | 10 |
| rsqMultiplier Multiplikator des adaptiven Supertrend | 2 |
| rsqCentre R-Quadrat-Wert, bei dem die adaptive Länge rsqPeriod entspricht | 0.25 |
| exitStFactor Multiplikator des Standard-Supertrend, der bei den Ausstiegen verwendet wird | 3 |
| exitStPeriod Länge des Standard-Supertrend, der bei den Ausstiegen verwendet wird | 5 |
| minGapPoints Trendlinien müssen mindestens so weit auseinanderliegen, damit gehandelt wird | 7 |
| pctDirection Der prozentuale Supertrend startet im Aufwärtsmodus | 1 |
| prevStopLong Vorheriger Long-Stop des prozentualen Supertrend | 0 |
| prevStopShort Vorheriger Short-Stop, sehr hoch initialisiert | 1000000000000 |
Jeder Durchlauf
| Markt | Zeiteinheit | PF | Trades | Treffer % | Netto | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBester Durchlauf | Täglich | n/a | 53 | 52.83 | 1,613,780 JPY | -1,041,500 |
| EUR/USD | Täglich | n/a | 25 | 60.00 | 83,943 USD | -82,640 |
| GBP/USD | Täglich | n/a | 44 | 43.18 | 12,847 USD | -11,278 |
Charts
Der Code
// ============================================================ // Combined Supertrend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false DEFPARAM PreloadBars = 10000 // --- Parameters --- positionSize = 1 // contracts per trade lookbackPeriod = 21 // window for the ATR trend line atrMultiplier = 3 // ATR multiple for the ATR trend line pctStopFactor = 0.005 // percentage supertrend distance, as a fraction of close rsqPeriod = 10 // r-squared window for the adaptive supertrend rsqMultiplier = 2 // multiplier of the adaptive supertrend rsqCentre = 0.25 // r-squared value where the adaptive length equals rsqPeriod exitStFactor = 3 // multiplier of the standard supertrend used in exits exitStPeriod = 5 // length of the standard supertrend used in exits minGapPoints = 7 // trend lines must be at least this far apart to trade ONCE pctDirection = 1 // percentage supertrend starts in up mode ONCE prevStopLong = 0 // previous long stop of the percentage supertrend ONCE prevStopShort = 1000000000000 // previous short stop, seeded very high // --- Indicators --- // Line one: ATR trend line, the channel extreme minus or plus a weighted ATR band. weightedAtr = WeightedAverage[lookbackPeriod](AverageTrueRange[1](close)) recentHigh = Highest[lookbackPeriod](high) recentLow = Lowest[lookbackPeriod](low) upperLimit = recentHigh[1]-(weightedAtr[1]*atrMultiplier) lowerLimit = recentLow[1]+(weightedAtr[1]*atrMultiplier) IF (close > upperLimit AND close > lowerLimit) THEN atrTrendLine = upperLimit ELSIF (close < lowerLimit AND close < upperLimit) THEN atrTrendLine = lowerLimit ELSE atrTrendLine = atrTrendLine[1] ENDIF // Line two: simplified percentage supertrend around the median price. pctDistance = close * pctStopFactor pctStopLong = MedianPrice - pctDistance pctStopShort = MedianPrice + pctDistance IF pctDirection = 1 AND pctStopLong < prevStopLong THEN pctStopLong = prevStopLong ENDIF IF pctDirection = -1 AND pctStopShort > prevStopShort THEN pctStopShort = prevStopShort ENDIF IF pctDirection = 1 AND close < pctStopLong THEN pctDirection = -1 ENDIF IF pctDirection = -1 AND close > pctStopShort THEN pctDirection = 1 ENDIF prevStopLong = pctStopLong prevStopShort = pctStopShort IF pctDirection = 1 THEN pctTrendLine = pctStopLong ELSE pctTrendLine = pctStopShort ENDIF // Line three: supertrend whose length adapts to the r-squared of recent closes. sourcePrice = CustomClose sumX = 0 sumXX = 0 sumXY = 0 sumYY = 0 sumY = 0 IF BarIndex > rsqPeriod THEN FOR k = 0 TO rsqPeriod-1 DO barPrice = sourcePrice[k] sumX = sumX+(k+1) sumXX = sumXX+((k+1)*(k+1)) sumXY = sumXY+((k+1)*barPrice) sumYY = sumYY+(barPrice*barPrice) sumY = sumY+barPrice NEXT covarianceXY = sumXY - sumX*sumY/rsqPeriod varianceX = sumXX - sumX*sumX/rsqPeriod varianceY = sumYY - sumY*sumY/rsqPeriod rSquared = ((covarianceXY*covarianceXY)/(varianceX*varianceY)) adaptiveSt = Supertrend[rsqMultiplier,round(rsqPeriod+rsqPeriod*(rSquared-rsqCentre))] ENDIF exitSt = Supertrend[exitStFactor,exitStPeriod] gapMargin = minGapPoints*PointSize
28 weitere Zeilen: die Einstiegs- und Ausstiegsregeln.
Setup
Fragen
Der Code läuft automatisch in ProOrder. Er hat keinen Stop Loss, fügen Sie daher einen Schutz auf Kontoebene hinzu, wenn Sie ihn handeln.
USD/JPY Täglich erzielte 1,613,780 JPY über 53 Trades, EUR/USD Täglich 83,943 USD über 25 Trades und GBP/USD Täglich 12,846.80 USD über 44 Trades, alle bei 1 Kontrakt.
Bei 1 Kontrakt fiel der USD/JPY-Durchlauf 1,041,500 JPY vom Höchststand und GBP/USD fiel 11,278.40 USD. Verkleinern Sie die Positionsgröße, wenn diese Zahlen für Ihr Konto zu groß sind.
Der Abstand von 7 Punkten zwischen den Linien und die 21-Bar-ATR-Linie sind auf langsame Bewegungen abgestimmt. Auf Tagescharts handelt das System nur wenige Male pro Jahr.
Verwandt
Die ProRealAlgos Community erhält die vollständigen Regeln, den kompletten Code und das automatisierte Portfolio.