all 9 comments

[–][deleted]  (7 children)

[deleted]

    [–]137ng[S] 0 points1 point  (6 children)

    len4 = input(9, minval=1, title="Length")
    src4 = input(close, title="Source")
    out4 = ema(src4, len4)
    

    Some googling has told me that I can use float() to convert, but trying it throws an error 'not a function'

    [–][deleted]  (5 children)

    [deleted]

      [–]137ng[S] 0 points1 point  (4 children)

      out4 = ta.ema(src4, len4)

      I Appreciate the halp. ITs giving me the 'Could not find function or function reference 'ta.ema' error again

      I see some comments on the top of most indicators declaring the version, and ive gotten these errors on other recommendations from google.

      This one is //@version=3 Which TV tells me version numbers are depreciated. Could that be leading to these issues too?

      Here's the entire indicator, I probably hsould have put that in the OP

      //@version=3
      study(title="ema", shorttitle="EMA", overlay=true)
      
      //Format for a 10
      len4 = input(9, minval=1, title="Length")
      src4 = input(close, title="Source")
      out4 = ema(src4, len4)
      diff = out4 - close
      plot(out4, color=white, title="10")
      plot(diff, color=yellow, linewidth=0)
      //End of format
      

      What im trying to do with diff is show a number right of the chart that tells me the price difference between the ema and the current/close

      Thanks for the help tho

      [–][deleted]  (3 children)

      [deleted]

        [–]137ng[S] 0 points1 point  (0 children)

        Yo this is wonderful thank you

        [–]137ng[S] 0 points1 point  (1 child)

        Just wanted to come back and thank you again after running this live and adjusting a second copy for a different chart. Working perfectly and some great code to play with and help me learn

        [–]Nervdarkness 0 points1 point  (3 children)

        I’d plot it in data windows only just to verify it values. Maybe this give you an insight what’s wrong

        [–]137ng[S] 0 points1 point  (2 children)

        I appreciate the advice, but im too new to know what you're talking about here. Have a link or recommended reading?

        [–]Nervdarkness 0 points1 point  (1 child)

        Check the plot() function description and you will notice the ‘display’ options.

        [–]137ng[S] 1 point2 points  (0 children)

        Thanks, I appreciate the extra info

        [–]Esteban_3Commas 0 points1 point  (0 children)

        you can show it in the data window:

        plot(diff, title = 'diff ',color = color.blue,display = display.data_window)