Conversion de la strategie SSL CHANNEL CROSS de Tradingview

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #193310 quote
    ARCO75
    Participant
    Average

    Voici une strategie simple basée sur le croisement de 2 lignes mais qui semble interessante au vu des backtests effectués

    code TradingView

    //@version=4
    strategy(“SSL Channel Cross”, overlay=true)
    period=input(title=”Period”, defval=10)
    len=input(title=”Period”, defval=10)
    smaHigh=sma(high, len)
    smaLow=sma(low, len)
    Hlv = 0
    Hlv := close > smaHigh ? 1 : close < smaLow ? -1 : Hlv[1]
    sslDown = Hlv < 0 ? smaHigh: smaLow
    sslUp = Hlv < 0 ? smaLow : smaHigh

    plot(sslDown, linewidth=2, color=color.red)
    plot(sslUp, linewidth=2, color=color.lime)

    longCondition = crossover(sslUp, sslDown)
    shortCondition = crossunder(sslUp, sslDown)

    if (longCondition)
    strategy.close(“Short”, strategy.long)
    strategy.entry(“Long”, strategy.long)

    if (shortCondition)
    strategy.close(“Long”, strategy.long)
    strategy.entry(“Short”, strategy.short)

    Merci d’avance

    Tradingview-CHANNEL-STRATEGIE-1.png Tradingview-CHANNEL-STRATEGIE-1.png
    #193314 quote
    ARCO75
    Participant
    Average

    J’ai omis de specifier que la conversion est demandée, bien sur,  afin d’etre utilisée sur PRT

    Je rajoute un premier resultat des derniers backtests

    #193315 quote
    ARCO75
    Participant
    Average
    #193323 quote
    Nicolas
    Keymaster
    Master
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Conversion de la strategie SSL CHANNEL CROSS de Tradingview


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
ARCO75 @arco75 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Nicolas
3 years, 10 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 05/17/2022
Status: Active
Attachments: 2 files
Logo Logo
Loading...