Buongiorno ragazzi, ho trovato sulle pagina fb di prt questo codice per creare un indicatore personalizzato “Valore renko Bar”
Ma mi da un errore sulla linea 1 “caratteri mancanti, suggerimenti RETURN”
Cosa vuol dire?
Link di riferimento
https://www.prorealcode.com/prorealtime-indicators/renko-boxes-on-price-chart/?fbclid=IwAR2RXKzTXbiCx4IifeRKnPqGrtT-lwSrXrjTacvUrXxAtE59zVf3GaRdIwQ
Grazie.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//parameters :
// boxsize = 50
once topprice = close
once bottomprice = close – boxsize*ticksize*2
if(close > topprice + boxsize*2) THEN
topprice= close
bottomprice= topprice – boxsize*2
ELSIF (close < bottomprice – boxsize*2) THEN
bottomprice= close
topprice= bottomprice + boxsize*2
ELSE
topprice= topprice
bottomprice= bottomprice
ENDIF
RETURN topprice as “box top”, bottomprice as “bottom box”
|
Hai fatto un copia & incolla errato probabilmente, lo riporto qui, ma forse è meglio se importi il file ITF allegato al link che hai indicato sopra:
//parameters :
boxsize = 50
once topprice = close
once bottomprice = close - boxsize*ticksize*2
if(close > topprice + boxsize*2) THEN
topprice = close
bottomprice = topprice - boxsize*2
ELSIF (close < bottomprice - boxsize*2) THEN
bottomprice = close
topprice = bottomprice + boxsize*2
ELSE
topprice = topprice
bottomprice = bottomprice
ENDIF
RETURN topprice as "box top", bottomprice as "bottom box"