Conversion from trading view Nadaraya-Watson Envelope
Forums › ProRealTime English forum › ProBuilder support › Conversion from trading view Nadaraya-Watson Envelope
- This topic has 27 replies, 8 voices, and was last updated 2 years ago by JS.
-
-
06/28/2022 at 4:19 PM #196327
Yes, it was expected, I dont understand why you are making comparison? 🙂
If you know what are the price values in 10 days, then you can plot an ideal channel considering that price, and this is what a repainting indicator like this one is doing.
The version I delivered is using only the current price and not any price that is unkown.
If you want me to code a perfect 1:1 indicator with this repainting behavior, it would take a lot of effort and time, I can do it as a paid service: https://www.prorealcode.com/trading-programming-services/
06/28/2022 at 4:29 PM #196328Thanks very much for your help.
Any idea of the cost ?
06/28/2022 at 6:48 PM #19634107/05/2022 at 7:03 PM #19682107/06/2022 at 8:11 AM #196850Hello, not really, I still run it on Tradingview. Having 2 systems is an issue, but cheaper than develop it by an expert for Prorealtime
Thanks
07/10/2022 at 9:10 PM #197090Hello again,
i’ve done some modification starting from Nicola’s version, i managed to make it work the same way as on trading view, here’s the code.
you can’t use it for alerts for now, it only draws the envelope.see attached image i’ve tested it on ETHUSD on the m1 timeframe.
i’ll keep imporving it, to see if in any way it can be used in live trading.
Zakaria
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051//Nadaraya-Watson Envelopedefparam drawonlastbaronly = truelength = 500//Window Sizehh = 8 //Bandwidthmult = 0.45src = Closen = barindexk = 2if IsLastBarUpdate theny2 = 0sume = 0for i = 0 to length-1sum = 0sumw = 0for j = 0 to length-1w = EXP(-pow(i-j,2)/(hh*hh*2))sum = sum+src[j]*wsumw = sumw+wnexty2 = sum/sumwsume = sume+abs(src[i] - y2)$a[barindex-i]=y2//DRAWPOINT(barindex-i, y2, 1)nextmae = sume/(length*mult)for i=0 to length-1DRAWPOINT(barindex-i, $a[barindex-i]-mae, 1) coloured(0,255,0,100)DRAWPOINT(barindex-i, $a[barindex-i]+mae, 1) coloured(255,0,0,100)//if close[barindex-i] > ($a[barindex-i]+mae) then // and src[1]<y2[1]+mae then//drawarrowdown(barindex-i,high) coloured("red")//endif//if close[barindex-i] < ($a[barindex-i]-mae) then //and src[1]>y2[1]-mae then//drawarrowup(barindex-i,low) coloured("green")//endifnext/*drawpoint(barindex,y2,1)drawpoint(barindex,y2+mae,1)drawpoint(barindex,y2-mae,1)*/Y2High=$a[barindex]+maeY2Low=$a[barindex]-maeendifreturn2 users thanked author for this post.
07/11/2022 at 6:10 AM #197102Thanks I will test it today.
Thanks again
07/11/2022 at 10:57 AM #197123The variable “Mult” input does not change the bands. Any idea ?
Thanks again
08/03/2022 at 1:46 PM #198421Dear Sir
Can I find this code in mql4?
08/11/2022 at 3:55 PM #19897008/11/2022 at 4:42 PM #198973Dear Sir
Can I find this code in mql4?
This forum is dedicated to the ProRealTime platform, thus conversions from other languages to PRT are free, while other conversions are available as paid services at this link https://www.prorealcode.com/trading-programming-services/.
08/14/2022 at 1:22 PM #199044Hi, this looks very interesting, but I can not get it to work when pasting into Trading View.
Can you confirm this is Pine like the original LuxAlgo one?
many thanks.
08/14/2022 at 2:42 PM #199045The code above is for ProRealTime and not Pine code…(it is not the original LuxAlgo)
-
AuthorPosts
Find exclusive trading pro-tools on