Traduzione codice TW Macd Vxi

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #245349 quote
    Msport71Msport71
    Participant
    Senior

    Buonasera,

    chiedo cortese traduzione codice Macd Vxi, che mi piacerebbe testare.

     

    Grazie per l’aiuto

    https://www.tradingview.com/script/WMxf5UKW-MACD-VXI/

    study(title=”MACD_VXI”, shorttitle=”MACD_VXI”)
    source = close
    fastLength = input(13, minval=1), slowLength=input(21,minval=1)
    signalLength=input(8,minval=1)
    fastMA = ema(source, fastLength)
    slowMA = ema(source, slowLength)
    macd = fastMA – slowMA
    signal = sma(macd, signalLength)
    hist = macd – signal
    plot(hist, style=histogram, color=black, linewidth=1)
    plot(macd, color=red, linewidth=1)
    plot(signal, color=blue, linewidth=2)
    //—————-
    plot(cross(signal, macd) ? signal : na, color=black, style = circles, linewidth = 4)
    OutputSignal = signal >= macd ? 1 : 0
    bgcolor(OutputSignal>0?#000000:#128E89, transp=80)
    //===============================================

    Screenshot-2025-03-27-at-16-50-30-MACD_VXI-—-Indicator-by-vdubus-—-TradingView.png Screenshot-2025-03-27-at-16-50-30-MACD_VXI-—-Indicator-by-vdubus-—-TradingView.png
    #245375 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Ecco:

    //-------------------------------------------//
    //PRC_MACD
    //version = 0
    //28.03.2025
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //-------------------------------------------//
    // Inputs
    //-------------------------------------------//
    src=close
    fastlength=13
    slowlength=21
    signalLength=8
    //-------------------------------------------//
    // MACD calculation
    //-------------------------------------------//
    fastMA=average[fastlength,1](src)
    slowMA=average[slowlength,1](src)
    imacd=fastMA-slowMA
    signal=average[signalLength,0](imacd)
    hist=imacd-signal
    //-------------------------------------------//
    // Signals
    //-------------------------------------------//
    if signal crosses over imacd or signal crosses under imacd then
    drawpoint(barindex,signal,2)coloured("black")
    endif
    //-------------------------------------------//
    // Background color
    //-------------------------------------------//
    if signal >= imacd then
    backgroundcolor("black",30)
    else
    backgroundcolor(18,142,137,30)
    endif
    //-------------------------------------------//
    return hist style(histogram)coloured("black"), imacd coloured("red"), signal coloured("blue")style(line,2)
    Msport71 thanked this post
    #245379 quote
    Msport71Msport71
    Participant
    Senior

    Grazie e mille!

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Traduzione codice TW Macd Vxi


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Msport71 @carlo-pasca Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Msport71Msport71
1 year, 5 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 03/27/2025
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...