Hola estoy intentando hacer un screener para el indicador Nadaraya watson.
Al ejecutarlo me pone que error de sintaxis en la linea 19 ,caracter 11.Complete la sintaxis de esta linea.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//Nadaraya-Watson Envelope
length = 21 //Window Size
hh = 8 //Bandwidth
mult = 2
src = CustomClose
n = barindex
k = 2
//if IsLastBarUpdate and barindex>length then
//y = 0
sume = 0
for i = 0 to length- 1
sum = 0
sumw = 0
for j = 0 to length- 1
w = exp (- (pow (i- j,2 )/ (hh* hh* 2 )))
sum = sum+ src[ j] * w
sumw = sumw+ w
next
y2 = sum/ sumw
sume = sume+ abs (src[ i] - y2)
//array.push(y,y2)
next
mae = sume/ length* mult
/*drawpoint(barindex,y2,1)
drawpoint(barindex,y2+mae,1)
drawpoint(barindex,y2-mae,1)*/
//endif
C1 = src crosses over y2- mae
screener [ C1]
¿Que es lo que falla?
Gracias por responder.