Conversion of indicator ema-sma vol from TradingView

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #172552 quote
    EdisoneEdisone
    Participant
    Average
    //@version=4
    study(title="ema-sma", shorttitle="ema-sma + vol")
    src = close 
    length = 9 //input(9, minval=1, title="short ema")
    lensma = 17 //input(17, title="long sma")
    vol = volume
    vm = 100 * ((sma(vol, length) - sma(vol, length)[4]) / sma(vol, length)[4])
    vvm = 100 * sma((vm - vm[1]) / vm[1], 3)
    osc = sma(ema(src, length) - sma(src, lensma), 3)
    sig = (osc + 2 * osc[1] + 2 * osc[2] + osc[3]) / 6
    cc = osc > 0 ? color.lime : osc < 0 ? color.red : na
    cut = abs(vvm / 8) > abs(sma(vvm, 5)) ? osc / 0.7 : na
    cv = cut > 0 ? color.aqua : color.orange
    si = plot(sig, color=cc, title="Sig")
    duml = plot(osc > sig ? osc : sig, style=plot.style_circles, linewidth=0, color=color.gray)
    os = plot(osc, color=cc, linewidth=2, title="ROC")
    fill(si, duml, color=color.green, transp=50)
    fill(os, duml, color=color.red, transp=50)
    hline(0, title="Zero Line", color=color.white, linewidth=2)
    colorebe = #0000ff
    hline(0, title="Zero Line", color=#0000ff, linewidth=2, linestyle=hline.style_solid)
    plot(cut, color=cv, style=plot.style_columns, linewidth=2, transp=60, title="Istogramma")

    Hello, as the title suggests, I need to convert the “ema-sma” indicator from the TradingView code if possible.
    Oscillator from the difference between Ema and Sma around line 0, fairly reactive if you use the crossing of the 2 lines, more conservative if you expect the lines to cross the zero line. Histogram / column for the large change in volume with the cut so that it only shows a large divergence with the mean. colors show trends.

    Thanks for your help.

    Screenshot-2021-06-07-at-15-05-02-ema-sma-—-Indicator-by-MarcoValente-1.png Screenshot-2021-06-07-at-15-05-02-ema-sma-—-Indicator-by-MarcoValente-1.png
    #172615 quote
    NicolasNicolas
    Keymaster
    Legend

    I have converted the code, you can download it from there: ema-sma + Volume

    ema-and-sma-with-volumes.png ema-and-sma-with-volumes.png
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

Conversion of indicator ema-sma vol from TradingView


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Edisone @edisone Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/27/2021
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...