Nadaraya-Watson: Rational Quadratic Kernel (Non-Repainting)

Forums ProRealTime English forum ProBuilder support Nadaraya-Watson: Rational Quadratic Kernel (Non-Repainting)

Viewing 15 posts - 1 through 15 (of 15 total)
  • #220102

    Hi All,

    I was wondering if it is possible to replicate an indicator from TradingView.

    It is called Nadaraya-Watson: Rational Quadratic Kernel (Non-Repainting). On the charts, it kind of looks like a regular Moving Average. But you can set the lines based on another timefrime

    You can find more info and the code on TV

    Thank you

    #220103
    #220105

    Hi,

    thanks. but that looks like the Envelope and not the Rational Quadratic Kernel (Non-Repainting), no?

    #220107

    Sorry, I recognised the name and gave the forum link assuming you were after the mid-line (the y2 variable of the return line), if what you’re after is not the same as this y2 then I don’t remember other Nadaraya-Watson code already made in the forum, Nicolas will assess whether it can be converted (and if yes will add it to the conversions list).

    #220108

    It is the same as the y2 line from the above code, apart that in that version the line takes color following another 2 period lag line crossing.

    Added to the conversion list in order to get the same as this one.

    #220150

    Ok, so it is not possible to create the same indicator as I posted initially?

    #220172

    Yes it is possible, please be patient 😉

    #220180

    Done!

    2 users thanked author for this post.
    #220187

    Haha ok will do. Thank you!

    #220188

    Oh wow, many thanks. Will try it over the weekend.

    #220189

    I get this error message. On which rows am I suppose to add values?

    sorry, really new to coding

     

    thank you

    #220192
    JS

    Hi @Harem

    Download the itf -file and import the itf-file under indicators…

    Now you have the complete code including the parameters…

    (So, don’t copy the code from the forum but download the itf-file)

    #220193

    much appreciated. Thank you

    #220225

    Hi,

    sorry, one more question. Do I have to have the maxlength parameter? or is there a default nr for that?

    #220249

    I added Maxlength because otherwise the indicator is very slow.
    I just translate the original code (without improving it to be faster, which is possible) and it seems it uses all barindex for calculation (which is not relevant too because it does not change the result after 200 or 300 bars).
    That is why i added Maxlength (too lazzy for improving the code)
    But you can change 400 to 2000 or more if you want, you will notice no change in the result exept more time of calculation

    ps : Lamaille is me

Viewing 15 posts - 1 through 15 (of 15 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login