AbzParticipant
Veteran
Hello
someone that can help with code for draw trend line for 10 days high and low ?
Thanks
A trend line follows a trend – do you mean a horizontal line? If so then the Donchian Channel indicator is the one you want and it is a standard indicator on the PRT platform.
AbzParticipant
Veteran
yes hortizontal , Thanks 🙂
Do you want to see only the last value of the whole ones through data history? (in this last case, the appropriate solution is the one given by Vonasi = use Donchian channel).
AbzParticipant
Veteran
i tried Donchian Channel indicator and this is not what i was thinking of. I just basically want a horizontal trend line showing the price for 10 day low and high
ok so that could be coded this way (with DRAWHLINE):
defparam drawonlastbaronly=true
drawhline(barindex,highest[10](high))
drawhline(barindex,lowest[10](low))
RETURN
(not tested)