hello support again

,
i would like to define the slope of Ma, i mean :
if the value of the ma at the previous candle is 1.3210 and the value of the ma at the current candle is 1.32
then
the slope is :
1.3210-1.32 = 0.0010
.0010*10000 = 10
thereafter i would like to recover this value for integrate in my signal condition for example :
if (mavalue >= 10){
"signal condition"
}else if (mavalue <= 10 ){
"signal condition"
}
i think it's a good way to define the range period or the trend period.
could you help me please.
best regards