Welcome to the BEST forum for traders

Did you know we're sharing tons of exclusive content here?
Our community is growing quickly. Take a look around and say "Hello".

aSmooth curve in pine script

Nov 1, 2022 - 6:44 PM

Viewed 959 times

https://best-trading-indicator.com/community/bti/forums/4180/topics/1465489 COPY
  • I am trying to plot a parabola on day chart of a stock in pine script but its not comming out as smooth. How can i make it smooth. The source code
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © vinaydahiya13

    //@version=5
    fun(x,y) =>

    a = 0.05424814081029087
    b = -7.8333850173715796
    c = 1152.0
    d = (x-1650542400000)/86400000
    
    
    z = (a*d*d) + b*d + c
    if(d<0)
        z:=0
    if(x>1662724800000 and x<= 1663588800000)
        z:=y-20
    if(x>1663588800000)
        z:=0
    z
    

    indicator(My script,overlay=true)
    // plot(fun(time_close('')))
    plot(fun(time_close(''),low))

    Screenshot 2022-11-01 231432.png

    0
  • Hi

    What do you mean by making it smooth?

    0
CONTENTS