You’re right to notice I didn’t see the first was just loss rather than ploss, true I was only looking at the sl=dlow(1) vs the sl=100…
However, it doesn’t change the answer, because unless I’m mistaken both loss and ploss require a distance with their syntax, not a level… so set stop loss dlow(1) would still consider dlow(1) as a distance and even if it’s not with ploss it would need “entryprice-dlow(1)” rather than dlow(1)
Also Nicolas might correct me but I think I remember reading him once saying that ploss might disappear in a future PRT version and only loss would remain (to be confirmed by him, that’s just a vague memory I’m having here), which might explain why the documentation with “ploss” in the url now points to “loss” rather than “ploss”:
https://www.prorealcode.com/documentation/ploss/
I am not aware of another keyword with “set stop” that would set up a stop loss directly on a level without calculating the distance.
The only way to work directly with a level and not a distance would be to use a pending stop order, but need to be aware that these type of orders are valid only during one candle, so the code needs to be written in a such a way it would reset it again at each candle it’s needed
https://www.prorealcode.com/documentation/stop-pending/
1 user thanked author for this post.