Conversion of Indicator Smart Money Interest Index from TradingView

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #231649 quote
    P. MarloweP. Marlowe
    Participant
    New
    A very interesting tool, I would really appreciate it. Thanks in advance.
    Here is the Pine Script code.
    // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © AlgoAlpha

     

    //@version=5
    indicator(“Smart Money Interest Index [AlgoAlpha]”, “AlgoAlpha – 🧠 Smart Money”, explicit_plot_zorder = true)
    x = input.int(25, “Index Period”, minval = 1)
    rr = input.int(14, “Volume Flow Period”, minval = 1)
    peakslen = input.int(500, “Normalization Period”, minval = 1)
    thr = input.float(0.9, “High Interes Threshold”, minval = 0.01, maxval = 0.99)
    green = input.color(#00ffbb, “Up Color”)
    red = input.color(#ff1100, “Down Color”)

     

    dumb = ta.pvi-ta.ema(ta.pvi,255)
    smart = ta.nvi-ta.ema(ta.nvi,255)

     

    drsi = ta.rsi(dumb, rr)
    srsi = ta.rsi(smart, rr)

     

    r = srsi/drsi //ratio shows if smart money is buying from dumb money selling and vice versa

     

    sums = math.sum(r, x)
    peak = ta.highest(sums, peakslen)

     

    index = sums/peak

     

    bottom = plot(0, display = display.none)
    top = plot(1, display = display.none)
    thresh = plot(thr, display = display.none)
    i = plot(index, color = green)
    fill(bottom, top, 1, 0, color.new(color.blue, 90), red)
    fill(thresh, top, 1, thr, color.new(color.yellow, 90), color.new(color.yellow, 60))
    fill(bottom, i, index, 0, green, chart.bg_color)

     

    barcolor(index > thr ? green : na)

     

    ///Alerts

     

    alertcondition(ta.crossover(index, thr), “High Smart Money Interest”)
    alertcondition(ta.crossunder(index, thr), “Smart Money Interest no longer high”)
    #231669 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Here you have the translation. You need at least 800 bars to calculate the indicator with default values in settings.

    //---------------------------------------------------------//
    //PRC_Smart Money Interest
    //version = 0
    //18.04.24
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //--------------------------------------------------------//
    //-----Inputs---------------------------------------------//
    x=25//Index Period
    rr=14//Volume flow period
    peakslen=500//Normalization period
    thr=0.9//High interest Threshold
    //--------------------------------------------------------//
    //-----Smart money and Dumb Money Calculation-------------//
    dumb=PositiveVolumeIndex(close)-average[255,1](PositiveVolumeIndex(close))
    smart=negativevolumeindex(close)-average[255,1](negativevolumeindex(close))
    //--------------------------------------------------------//
    //-----RSI Smart money and Dumb Money---------------------//
    drsi=rsi[rr](dumb)
    srsi=rsi[rr](smart)
    //--------------------------------------------------------//
    //-----Ratio Smart vs Dumb Money--------------------------//
    //Shows if smart money is buying from dumb money selling and vice versa
    r=srsi/drsi
    sums=summation[x](r)
    peak=highest[peakslen](sums)
    myindex=sums/peak
    //--------------------------------------------------------//
    //-----Plot and color-------------------------------------//
    btm=0
    tp=1
    colorbetween(btm,tp,"blue",90)
    colorbetween(thr,tp,"yellow",90)
    colorbetween(myindex,btm,"lime")
    
    return myindex as "Index"coloured("Green"),btm as "Bottom", tp as "Top"style(line), thr as "Threshold" style(dottedline)
    
    #231670 quote
    P. MarloweP. Marlowe
    Participant
    New

    Hi Iván. I didn´t hope quite a feat, I’m amazed how fast you did it. I must work on peakslen, it´s a little bit tricky. Thank you so much. You are a hard act to follow.

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

Conversion of Indicator Smart Money Interest Index from TradingView


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
P. Marlowe @p-marlowe Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by P. MarloweP. Marlowe
2 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/18/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...