traduttore da tredingview a mt4

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #147500 quote
    wako
    Participant
    New
    //@version=3
    strategy(“DAX /BB+Rsi strategy”, shorttitle=”DAX /BB+Rsi strategy”, overlay=true)
    ///////////// RSI
    RSIlength = input( 16 ,title=”RSI Period Length”)
    RSIvalue = input( 45 ,title=”RSI Value Range”)
    RSIoverSold = 0 + RSIvalue
    RSIoverBought = 100 – RSIvalue
    price = close
    vrsi = rsi(price, RSIlength)
    
    ///////////// Bollinger Bands
    BBlength = input(20, minval=1,title=”Bollinger Bands SMA Period Length”)
    BBlength1 = input(20, minval=1,title=”Bollinger Bands SMA Period Length”)
    BBmult = input(2.0, minval=0.001, maxval=50,title=”Bollinger Bands Standard Deviation”)
    BBmult1 = input(2.0, minval=0.001, maxval=50,title=”Bollinger Bands Standard Deviation”)
    BBbasis = sma(price, BBlength)
    BBbasis1 = sma(price, BBlength1)
    BBdev = BBmult * stdev(price, BBlength)
    BBdev1 = BBmult1 * stdev(price, BBlength1)
    BBupper = BBbasis + BBdev
    BBupper1 = BBbasis1 + BBdev1
    BBlower = BBbasis – BBdev
    BBlower1 = BBbasis1 – BBdev1
    source = close
    buyEntry = crossover(source, BBlower)
    buyEntry1 = crossover(source, BBlower1)
    sellEntry = crossunder(source, BBupper)
    sellEntry1 = crossunder(source, BBupper1)
    plot(BBbasis, color=aqua,title=”Bollinger Bands SMA Basis Line”)
    plot(BBbasis1, color=aqua,title=”Bollinger Bands SMA Basis Line1″)
    p1 = plot(BBupper, color=silver,title=”Bollinger Bands Upper Line”)
    p2 = plot(BBupper1, color=silver,title=”Bollinger Bands Upper Line1″)
    p3 = plot(BBlower, color=silver,title=”Bollinger Bands Lower Line”)
    p4 = plot(BBlower1, color=silver,title=”Bollinger Bands Lower Line1″)
    fill(p1, p3)
    fill(p2, p4)
    
    ///////////// Colors
    switch1=input(true, title=”Enable Bar Color?”)
    switch2=input(true, title=”Enable Background Color?”)
    TrendColor = RSIoverBought and (price[1] > BBupper and price < BBupper) ? red : RSIoverSold and (price[1] < BBlower and price > BBlower) ? green : na
    barcolor(switch1?TrendColor:na)
    bgcolor(switch2?TrendColor:na,transp=50)
    
    ///////////// RSI + Bollinger Bands Strategy
    if (not na(vrsi))
    
    if (crossover(vrsi, RSIoverSold) and crossover(source, BBlower))
    strategy.entry(“RSI_BB_L”, strategy.long, stop=BBlower, oca_type=strategy.oca.cancel, comment=”RSI_BB_L”)
    else
    strategy.cancel(id=”RSI_BB_L”)
    
    if (crossunder(vrsi, RSIoverBought) and crossunder(source, BBupper))
    strategy.entry(“RSI_BB_S”, strategy.short, stop=BBupper, oca_type=strategy.oca.cancel, comment=”RSI_BB_S”)
    else
    strategy.cancel(id=”RSI_BB_S”)
    
    //plot(strategy.equity, title=”equity”, color=red, linewidth=2, style=areabr)
    
    ///////////////////Ma
    MA = input(title=”MA”, defval=”EMA”, options=[“EMA”, “SMA”])
    len3 = input(200, minval=1, title=”EMA 3″)
    src3 = input(close, title=”EMA 3 Source”)
    ema3 = ema(src3, len3)
    plot(ema3, color=orange, linewidth=2, title=”EMA 3″)
    #147504 quote
    robertogozzi
    Moderator
    Master

    Per favore usa sempre il pulsante “Insert PRT code” quando inserisci il codice nei tuoi post per facilitare la lettura degli altri. Grazie 🙂

    Essendo un forum sulla piattaforma ProRealTime si possono fare, gratuitamente, solo le conversioni da altre piattaforme a ProRealTime.

    Per la conversione di codici verso altre piattaforme, o tra piattaforme diverse, devi usare il servizio di programmazione a pagamento https://www.prorealcode.com/trading-programming-services/.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

traduttore da tredingview a mt4


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
wako @wako Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/15/2020
Status: Active
Attachments: No files
Logo Logo
Loading...