Support and resistance MTF

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #161095 quote
    Soyouzzz1
    Participant
    Junior

    Hello, is it possible to create an indicator to automatically display :

    – the highest and the lowest of the day
    – Highest and lowest of the previous day
    – the open of the day (3:30 pm for US futures, 08:00 am for European futures)
    – the close (10:00pm) of the previous day
    – week’s high and week’s low
    – last week’s highs and lows
    – ATH
    – the high and low Bollinger bands in 15min, H1, H4 and daily, only if they close (High Bollinger is >= High Bollinger [1] and the opposite for the low Bollinger bands
    – moving averages 20 in H1, H4 and daily only if they rise (sma20>sma20 [1] and are above their sma50, or they fall and are below their sma50

     

    2 important points :

    1. The levels should not be drawn by horizontal lines but by segments that start from the point and go only to the right of the graph (as on the screenshot).

    2. Bollinger and moving average bands should appear in their TF and in the lower TF but not in the upper TF (ex: an SMA20 in H1 appears in H1, 15min, 5min… but not in H2, H4…).

     

    Such an indicator will help the whole community to detect the most likely bounce levels.

    Thank you for your help.

    High-Low-Close-Open-ATH-and-Bollinger-Bands.png High-Low-Close-Open-ATH-and-Bollinger-Bands.png
    #161106 quote
    Soyouzzz1
    Participant
    Junior

    I started using parts of the code found on the site and on the PRT documentation but there are several problems:

    1. The code is unstable.
    Sometimes it displays the open/close of the previous day but these levels are erased a few seconds later.

    2. The previous day’s highs/lows are not at the right levels.

    3. When I try to put the bollinger bands on when they tighten they don’t show up anymore.

    4. I don’t know how to display the levels only on the lower TFs.


    @nicolas
    , @vonasi and @robertogozzi, do you know how to solve these problems ?

     

    // Open/High/Low/Close/Bollinger Bands
    
    defparam drawonlastbaronly = true
    
    HighVT = DHigh(1)
    LowVT = DLow(1)
    OpenVT = DOpen(1)
    LowVT = DLow(1)
    BBU = BollingerUp[20](close)
    BBD = BollingerDown[20](close)
    
    IF TIME =220000 AND date=yesterday THEN
    CloseVT = Close
    else
    IF TIME =153000 AND date=yesterday THEN
    OpenVT = Open
    Endif
    endif
    
    //vertical offset to draw text correctly over horizontal lines
    Voffset = 0*pipsize
     
    //draw Open/High/Low/Close/Bollinger Bands  Text
    DRAWTEXT("D-1 Close",barindex-54,CloseVT+Voffset,SansSerif,Standard,10)coloured(153,51,255)
    DRAWTEXT("D-1 High",barindex-54,HighVT+Voffset,SansSerif,Standard,10)coloured(0,204,51)
    DRAWTEXT("D-1 Low",barindex-54,LowVT+Voffset,SansSerif,Standard,10)coloured(0,204,51)
    DRAWTEXT ("D-1 Open", barindex-54,OpenVT+Voffset,SansSerif,Standard,10)coloured(153,51,255)
    DRAWTEXT ("BBU", barindex-54,BBU+Voffset,SansSerif,Standard,10)coloured(153,51,255)
    DRAWTEXT ("BBD", barindex-54,BBD+Voffset,SansSerif,Standard,10)coloured(153,51,255)
    
    //draw Open/High/Low/Close/Bollinger Bands lines without extensions
    DRAWSEGMENT(barindex-50,CloseVT,barindex,CloseVT) coloured(153,51,255)
    DRAWSEGMENT(barindex-50,HighVT,barindex,HighVT) coloured(0,204,51)
    DRAWSEGMENT(barindex-50,LowVT,barindex,LowVT) coloured(0,204,51)
    DRAWSEGMENT(barindex-50,OpenVT,barindex,OpenVT) coloured(153,51,255)
    DRAWSEGMENT(barindex-50,BBU,barindex,BBU) coloured(153,51,255)
    DRAWSEGMENT(barindex-50,BBD,barindex,BBD) coloured(153,51,255)
    
    RETURN
    Open-high.png Open-high.png Open-high-suite.png Open-high-suite.png
    #161110 quote
    Nicolas
    Keymaster
    Master

    We are aware of an issue of OHLC of Daily timeframe when using DHigh, DLow, etc.. instruction. We are waiting for the update to fix that.

    Soyouzzz1 thanked this post
    #161111 quote
    Vonasi
    Moderator
    Master

    While we wait for the fix this workaround code might be of use to you:

    A code about highs of last ten days

    Soyouzzz1 thanked this post
    #161508 quote
    Soyouzzz1
    Participant
    Junior

    Thank you for the share 😉

    #161509 quote
    Soyouzzz1
    Participant
    Junior

    Allright, I will wait. 🙂

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

Support and resistance MTF


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Soyouzzz1 @soyouzzz1 Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by Soyouzzz1
4 years, 12 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/11/2021
Status: Active
Attachments: 3 files
Logo Logo
Loading...