What is that noob trying to achieve?
Why is he still using wrong stuff?
Is he still not getting it?
Google translator prints out some gibberish that makes not much translated sense.
I repeat again.
Lastvalue ALWAYS outputs last value of array. ALWAYS!
SelectedValue in analysis ALWAYS outputs last value of array. ALWAYS! You can not select values in analysiswindow via selectedvalue().
And this is improper use
MA20_UP[LastValue( BarIndex() )]
if you wanna get last value via [..] then use barcount-1
MA20_UP[barcount-1]
But that again will ALWAYS output last value. ALWAYS.
Then explain in English since most Chinese here don't understand proper AFL programming anyway.
Using Selectedvalue and Lastvalue in Analysis simply is plain stupid.
What is the reproducible code? What are you trying to achieve?