Interesting how one differs from the other. The result is the same but I would write that code snippet this way:
1
2
3
IFclose<=low+Range*0.5THEN
SELLSHORTATMARKET
ENDIF
If I want to only sell short if it is in the bottom 10% I merely replace 0.5 with 0.1. This makes it very easy to run optimizations and find out if there is different edge in different percentages.
I’m not saying that one is better than the other, just that there are more ways than one to skin a cat.