Draw trend line for 10 days H/L

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #106619 quote
    Abz
    Participant
    Veteran

    Hello

    someone that can help with code for draw trend line for 10 days high and low ?

     

    Thanks

    #106620 quote
    Vonasi
    Moderator
    Master

    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.

    #106625 quote
    Abz
    Participant
    Veteran

    yes hortizontal , Thanks 🙂

    #106670 quote
    Nicolas
    Keymaster
    Master

    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).

    #106680 quote
    Abz
    Participant
    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

    #106683 quote
    Nicolas
    Keymaster
    Master

    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)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Draw trend line for 10 days H/L


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Abz @abbas_sadiq Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by Nicolas
6 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/05/2019
Status: Active
Attachments: No files
Logo Logo
Loading...