Formula:
// --- settings ---
//weight in % for each neuron
//x1=5
//x2=10
//x3=25
//x4=50
//indicator previous period
//y1=0
//y2=7
//y3=14
//y4=21
// --- end of settings ---
//indicator to be used by the neural network
indi = average[5](rsi[14])
w1=x1-100
w2=x2-100
w3=x3-100
w4=x4-100
a1=indi[y1]
a2=indi[y2]
a3=indi[y3]
a4=indi[y4]
return(w1*a1+w2*a2+w3*a3+w4*a4)
Indicator in this chart: