Draw a Trend at a Time period? please help

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #61034 quote
    crolakstrading
    Participant
    Senior

    Hi.

    Is there any help i can get to draw a trend line at 6am. lets say using the 1hour chart .. taking 1am to 6am candles — Draw a trend line connecting a valid swing high with those 6candles  (highest point on that 6candles) to the  most recent swing high of the previous days (previous days high)

     

    is this possible?? please see the attached pic to get an idea!!!  please any help appreciated

    Pro-real-Ex.png Pro-real-Ex.png
    #61074 quote
    Nicolas
    Keymaster
    Master

    Yes that’s possible, only for an 1 hour timeframe?

    #61112 quote
    crolakstrading
    Participant
    Senior

    Hi Nicolas,

    Thanks for the reply.

    Yes this is only for 1hour time frame.. not sure how to get the swing high (highest) of that past 6 candles (1am to 6am) and connect to previous days high!!!

    Many thanks

    Ro

    #61604 quote
    crolakstrading
    Participant
    Senior

    Hi Nicolas,

    please are you able help to achieve this?

    #61641 quote
    Nicolas
    Keymaster
    Master

    I think it should works like the way you want. I only plot the lines for the current day, otherwise the chart would be filled with plenty of lines of previous days… since we can’t erase what’s already plotted.

    Arrow = 0
    Ncandles = 5
    
    Nside = (Ncandles - 1) / 2
    
    ctime = time>010000 and time<=060000 and date=today
    
    hh=max(high,hh)
    if hh<>hh[1] then 
    highbar=barindex
    endif
    
    if intradaybarindex=0 then
    hh=0 
    prevhighbar=highbar
    drawvline(barindex) coloured(255,0,0)
    endif 
    
    if ctime then 
    IF high[Nside] >= highest[Ncandles](high) THEN
    Fup = high[Nside]
    FupBar = barindex[Nside]
    Arrow = -1
    ENDIF
      
    IF Arrow = -1 THEN
    DRAWtext("o",barindex[2],high[2]+Averagetruerange[5]/3)coloured(255,0,0)
    drawline(prevhighbar,dhigh(1),FupBar,Fup)
    ENDIF
    endif
    
    return
    trendline-intraday.png trendline-intraday.png
    #61660 quote
    crolakstrading
    Participant
    Senior

    Hi nicolas,

     

    Thanks very much for the reply,

    how can i change this to 1 hour time frame? when its on the one hour only the vertical lines appear? but not the trend line?

    #61690 quote
    Nicolas
    Keymaster
    Master

    Because no swing high had been detected today on the active instrument between the schedules (from 1AM to 6AM).

    #61698 quote
    crolakstrading
    Participant
    Senior

    ahh.. got it!!! thanks for the help nicolas!

    #134745 quote
    tobytarczy
    Participant
    New

    Hi,

     

    I have been trying to find an example that I could use to create a downward and upward trend line based on the highest and lowest bar respectively that includes 3 bars. In otherwords only draw the line if there are 3 points that can be derived. I want to make this work across all the major time frames. I have tried a few examples but I haven’t been able to make it work. The example that was provided in this blog is a good one, only it hits just 2 high points.

    Thank you in advance.

     

    Toby

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

Draw a Trend at a Time period? please help


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/31/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...