Donchian Persistance

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #11253 quote
    Copperwave
    Participant
    Veteran

    Bonjour Nicolas

    Is there a way to get Donchian based HH & LL’s over n periods to persist and continue to draw their respective levels to the right rather than being re-written at the next period refresh? I appreciate this may make a chart look at little messy over the course of a day but for me it would be useful to identify S&R zones as the trading day evolves.

     

    Thanks in advance

    ::copperwave

    #11284 quote
    Nicolas
    Keymaster
    Master

    Hello Copperwave,

    Since we never know in advance, how much time the higher high and the lower low will change in a day, it would involve to build multiple lines into a data array and there is not possibility to build array with ProBuilder.

    So maybe, we could limit the number of past HH and LL lines that can be drawn on chart, and we could build something with, what do you think?

    #11307 quote
    Copperwave
    Participant
    Veteran

    Hi Nicolas – thanks for responding and confirming my thoughts about not being able to do an array. In the meantime I kludged this together:

    // p = 60, (1 hour lookback on 1 min chart)
    // n = 1
    Upper = Highest[p](High)
    Lower = Lowest[p](Low)
    
    if Upper > Upper[n] then
    PreviousHigh = Upper[n]
    PPH = PreviousHigh[n]
    PPPH = PPH[n]
    endif
    
    if Lower < Lower[n] then
    PreviousLow = Lower[n]
    PPL = PreviousLow[n]
    PPPL = PPL[n]
    endif
    
    RETURN upper AS "upper" , lower AS "lower", PreviousHigh AS "PH", PreviousLow AS "PL", PPH AS "PPH", PPL AS "PPL", PPPH, PPPL

     

    While the previous HH and LL’s get drawn, they eventually get overwritten every 60 bars…or whatever p is set to and so it begins to look like strange Darvas boxes. If it is possible to limit to the past 4 HH & LL’s that would be something 🙂

    Many thanks

    ::copperwave

    #11312 quote
    Nicolas
    Keymaster
    Master

    Maybe an alternative would be to only allow once the new HH and LL to be set with different periods. Then you can add many instance of the same indicator on the chart.

    #11321 quote
    Copperwave
    Participant
    Veteran

    That would get me different overlaid Donchian channels if I understand your suggestion correctly. That isn’t what I am after. All I want to do is preserve an existing HHLL level to the right while re-writing the new one’s as they occur.

    Thanks

    ::copperwave

    #11324 quote
    Nicolas
    Keymaster
    Master

    Hmm but it’s not possible to draw things at the right of the price.

    In 10.3 version we could draw on the last bar some lines or maybe rectangles, but they may overlay on candlesticks.

    #11337 quote
    Copperwave
    Participant
    Veteran

    Hi – OK, well I guess I’ll have to stick to drawing lines manually then 🙂

     

    Thanks

    ::copperwave

    #11351 quote
    Nicolas
    Keymaster
    Master

    Recently I had an idea about drawing a kind of a “market profile” indicator overlaid on the recent candlesticks, made of recent highs/lows. It is still an idea, like many others on my to-do list.

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

Donchian Persistance


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Copperwave @copperwave Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by Nicolas
9 years, 6 months ago.

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