INDICATORE SVAPO

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #61011 quote
    salvo64salvo64
    Participant
    Junior

    Salve Nicolas, le chiedo se è possibile tradurre il seguente indicatore per PROREALTIME :

    // @author LazyBear
    // List of all my indicators:
    // https://docs.google.com/document/d/15AGCufJZ8CIUvwFJ9W-IKns88gkWOKBCvByMEvm5MLo/edit?usp=sharing
    //
    study(“No Volume SVAPO [LazyBear]”, shorttitle=”SVAPO_NOVOL_LB”)
    length=input(8, title=”SVAPO Period”, minval=2, maxval=20)
    cutoff=input(1, title=”Minimum %o price change”, maxval=10, minval=0)
    devH=input(1.5, title=”Stdev High”, maxval=5, minval=0.1)
    devL=input(1.3, title=”Stdev Low”, maxval=5, minval=0.1)
    stdevper=input(100, title=”Stdev Period”, maxval=200, minval=1)

    calc_tema(s, length) =>
    ema1 = ema(s, length)
    ema2 = ema(ema1, length)
    ema3 = ema(ema2, length)
    3 * (ema1 – ema2) + ema3

    calc_linregslope(C, tp) =>
    ((tp*(sum(cum(1)*C,tp)))-(sum(cum(1),tp)*(sum(C,tp))))/((tp*sum(pow(cum(1),2),tp))-pow(sum(cum(1),tp),2))

    calc_OR2(x) =>
    y=x // To force expr evaluation
    (y == true) or (y[1] == true)

    src=close
    haOpen=(ohlc4[1] + nz(haOpen[1]))/2
    haCl=(ohlc4+haOpen+max(high, haOpen)+min(low, haOpen))/4
    haC=calc_tema(haCl, round(length/1.6))
    vma=sma(src, length*5)
    vave=vma[1]
    vmax=2*vave
    vc=iff(src<vmax, src, vmax)
    vtr=calc_tema(calc_linregslope(src, length), length)
    svapo=calc_tema(sum(iff(haC>(nz(haC[1])*(1+cutoff/1000)) and calc_OR2((vtr>=nz(vtr[1]))), vc, iff(haC<(nz(haC[1])*(1-cutoff/1000)) and calc_OR2((vtr>nz(vtr[1]))),-vc,0)), length)/(vave+1),length)
    plot(devH*stdev(svapo,stdevper), color=red, style=3)
    plot(-devL*stdev(svapo,stdevper), color=green, style=3)
    plot(0, color=gray, style=3)
    plot(svapo, color=maroon, linewidth=2)

     

    il codice l’ho preso da tradingview

    #61015 quote
    NicolasNicolas
    Keymaster
    Legend
    #61046 quote
    salvo64salvo64
    Participant
    Junior

    Grazie Nicolas, sei un grande.

    Salvo 64

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

INDICATORE SVAPO


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
salvo64 @salvo64 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by salvo64salvo64
8 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 01/30/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...