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/25/2022 at 12:29 PM #196081
Here is the code attached, 70 lines.
Thanks to all06/28/2022 at 8:29 AM #196255Please next time, add some explanations and screenshots of what we have to recode for you.
This indicator is repainting, it means that in real time the signals will be very different than the ones you see in the past, it uses futures datas in order to show perfect channels and signals. So it is useless for trading, what’s your opinion?
06/28/2022 at 9:07 AM #196261Thank you Nicolas, no indicator is perfect, but here is the screenshot of the NQ for the last 2 days.
06/28/2022 at 9:13 AM #196268Of course, I simply meant that today's curve will not look the same tomorrow, when the history is completed. Each data that is included in the calculation modifies the calculation of the past and the indicator is continually retraced.
06/28/2022 at 9:39 AM #196273I understand your point, but in daytrading this indicator gives good TP or entry points as you can see on the chart.
06/28/2022 at 12:13 PM #196295Believe me I’d like to help, and sorry to insist, I do want to be sure you have fully undersand what it means since you are still talking about entries/tp of the past history: The entries plotted on the chart were not the same in real time.
06/28/2022 at 12:37 PM #196301At first thanks for helping,
I understand your point, but even if the past triggers are modified afterwards, Real time triggers are still worth it
.
06/28/2022 at 12:40 PM #19630306/28/2022 at 12:44 PM #196304Is very nice of you,
Thanks again
06/28/2022 at 2:37 PM #196311Please find attached the translated version (non repainting) of Nadaraya-Watson Envelope
1234567891011121314151617181920212223242526272829303132333435363738394041//Nadaraya-Watson Envelopelength = 21 //Window Sizehh = 8 //Bandwidthmult = 2src = CustomClosen = barindexk = 2//if IsLastBarUpdate and barindex>length then//y = 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)//array.push(y,y2)nextmae = sume/length*mult/*drawpoint(barindex,y2,1)drawpoint(barindex,y2+mae,1)drawpoint(barindex,y2-mae,1)*/if src crosses under y2+mae then // and src[1]<y2[1]+mae thendrawarrowdown(barindex,high) coloured("red")endifif src crosses over y2-mae then //and src[1]>y2[1]-mae thendrawarrowup(barindex,low) coloured("green")endif//endifreturn y2,y2+mae,y2-maeThe nested loops are huge intensive for calculation, please consider using a limited units display (such as 1k units only).
06/28/2022 at 3:02 PM #196314Thanks a lot, I have this error in the window ?
“hh” Variable which becomes “h”
And one stupid question, How to you show the indicator in the chart and not only in the window below ?
Thanks again
06/28/2022 at 3:17 PM #196316Sorry I found for hh.
If i declare hh variable as decimal, is it possible for me to input 2.1?
Also Lengh is supposed to minimize loop calculation, but it shows on the graph for value superior to 500.
Thanks again
06/28/2022 at 3:34 PM #196318Sorry I found for the TA overlay. So the only question :
- If i declare hh variable as decimal, is it possible for me to input 2.1?
- Also Lengh is supposed to minimize loop calculation, but it shows on the graph for value superior to 500
Thanks again
06/28/2022 at 3:47 PM #19632106/28/2022 at 3:59 PM #196323Here are the diffrence (crosses) between the 2 plateforms with the same variables.
Thanks
-
AuthorPosts
Find exclusive trading pro-tools on