Ho scritto il codice per uno screener. Non c’è nessun errore di sintassi, ma forse c’è qualche errore di logica perchè non trova risultati. Potete aiutarmi a trovarli?<!–more–>
xOpen = open
xClose = (open + close + high + low) / 4
if barindex > 0 then
xOpen = (xOpen[1] + xClose[1]) / 2
endif
//
xLow = min(low,min(xClose,xOpen))
xHigh = max(high,max(xClose,xOpen))
//xTypic = (xHigh + xLow + xClose) / 3
//xMed = (xHigh + xLow) / 2
//xRange = xHigh – xLow
//
Verde = xClose > xOpen
Rossa = xClose < xOpen
Trenda = Verde[3] AND Verde[4] AND Verde[5]
Trendv = Rossa[3] AND Rossa[4] AND Rossa[5]
Shadow1 = (xHigh[1] – Max (xClose[1],xOpen[1])) > Abs (xClose[1]-xOpen[1])
Shadow2 = Min (xClose[1],xOpen[1]) – xLow[1] > Abs (xClose[1]-xOpen[1])
Body = xClose AND xOpen
a1 = Shadow2[1] AND Shadow2[2]
a2 = Body[1] < xOpen[3]
a3 = Body[2] < xOpen[3]
a4 = Body[2] > xClose[3]
a5 = Body[1] > xClose[3]
v1 = Shadow1[1] AND Shadow1[2]
v2 = Body[1] < xClose[3]
v3 = Body[2] < xClose[3]
v4 = Body[2] > xOpen[3]
v5 = Body[1] > xOpen[3]
acquisto = a1 AND a2 AND a3 AND a4 AND a5 AND Verde AND Trendv
vendita = v1 AND v2 AND v3 AND v4 AND v5 AND Rossa AND Trenda
SCREENER[acquisto OR vendita]