There may be strange places because I am using translation
Is there a way to register any value as universal?
For example, if close[2] > close[1] and close[1] < close, then set close[1] to x and impossible to change x after that.
So you want to change the value of an internal constant (price of the instrument)? Not possible 🙂
But you can create your own “constant” by using an array, let’s call it $close
test = close[2] > close[1] and close[1] < close
if test then
i = i + 1 //increase the array size
$close[i] = medianprice //change x with what value you want to store
endif
return lastset($close) //visualize the last stored value