Traduzione codice TW USI

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

    Buongiorno,

    richiedo cortese traduzione di questa versione aggiornata e modificata del Wilder Rsi.

    Grazie per il prezioso aiuto.

    https://it.tradingview.com/script/NwmP4Iau-TASC-2024-11-Ultimate-Strength-Index/

    Screenshot-2024-11-18-at-10-05-39-TASC-2024.11-Ultimate-Strength-Index-—-Indicatore-di-PineCodersTASC.png Screenshot-2024-11-18-at-10-05-39-TASC-2024.11-Ultimate-Strength-Index-—-Indicatore-di-PineCodersTASC.png
    #240533 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Ecco qui

    //---------------------------------------//
    //PRC_USI Ultimate Strength Idx
    //version = 0
    //19.11.2024
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //---------------------------------------//
    // inputs
    //---------------------------------------//
    src=close
    l1=28
    l2=4
    //---------------------------------------//
    // Prev. calculations
    //---------------------------------------//
    eps=ticksize
    diff=src-src[1]
    if diff>0 then
    su=diff
    sd=0
    else
    su=0
    sd=-diff
    endif
    //---------------------------------------//
    // USU calculation
    //---------------------------------------//
    srcUSU=average[l2](su)
    a1su=exp(-1.414*3.1416/l1)
    c2su=2*a1su*cos(1.414*3.1416/l1*(180/3.1416))
    c3su=-a1su*a1su
    c1su=(1+c2su-c3su)/4
    if barindex<6 then
    usu=srcUsu
    else
    usu=(1-c1su)*srcUsu+(2*c1su-c2su)*srcUsu[1]-(c1su+c3su)*srcUsu[2]+c2su*usu[1]+c3su*usu[2]
    endif
    //---------------------------------------//
    // USD calculation
    //---------------------------------------//
    srcUSD=average[l2](sd)
    a1sd=exp(-1.414*3.1416/l1)
    c2sd=2*a1sd*cos(1.414*3.1416/l1*(180/3.1416))
    c3sd=-a1sd*a1sd
    c1sd=(1+c2sd-c3sd)/4
    if barindex<6 then
    usd=srcUsd
    else
    usd=(1-c1sd)*srcUsd+(2*c1sd-c2sd)*srcUsd[1]-(c1sd+c3sd)*srcUsd[2]+c2sd*usd[1]+c3sd*usd[2]
    endif
    //---------------------------------------//
    // USI calculation
    //---------------------------------------//
    if (usu+usd) <>0 and usu>eps and usd>eps then
    usi=(usu-usd)/(usu+usd)
    endif
    //---------------------------------------//
    // Plot configuration
    //---------------------------------------//
    midline=0
    if usi>midline then
    r=0
    g=255
    b=0
    a=50
    else
    r=255
    g=0
    b=0
    a=50
    endif
    colorbetween(usi,midline,r,g,b,a)
    //---------------------------------------//
    return usi as "USI" coloured("blue")style(line,2), 0 as "zero" style(line)
    Msport71 thanked this post
Viewing 2 posts - 1 through 2 (of 2 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 USI


ProBuilder: Indicatori & Strumenti Personalizzati

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

This topic contains 1 reply,
has 2 voices, and was last updated by Iván GonzálezIván González
1 year, 10 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 11/18/2024
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...