will this code execute faster than the below code?
//Code 1
temp1=(close>open)
if(temp1) then
.....
endif
temp1=(close>10) //I will reuse the same temporary variable again
if(temp1) then
.....
endif
or this code will be faster?
//Code 1
temp1=(close>open)
if(temp1) then
.....
endif
temp2=(close>10) //I will another temporary variable
if(temp2) then
.....
endif
It’s the same, maybe the second one might spare some RAM, but speed won’t be affected.
This link might be of some interest
https://www.prorealcode.com/blog/learning/speed-calculation-indicator/.