Support and resistance MTF
Forums › ProRealTime English forum › ProBuilder support › Support and resistance MTF
- This topic has 5 replies, 3 voices, and was last updated 3 years ago by Soyouzzz1.
-
-
02/11/2021 at 3:19 PM #161095
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 sma502 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.
02/11/2021 at 4:14 PM #161106I 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 ?123456789101112131415161718192021222324252627282930313233343536373839// Open/High/Low/Close/Bollinger Bandsdefparam drawonlastbaronly = trueHighVT = 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 THENCloseVT = CloseelseIF TIME =153000 AND date=yesterday THENOpenVT = OpenEndifendif//vertical offset to draw text correctly over horizontal linesVoffset = 0*pipsize//draw Open/High/Low/Close/Bollinger Bands TextDRAWTEXT("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 extensionsDRAWSEGMENT(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)RETURN02/11/2021 at 4:29 PM #16111002/11/2021 at 4:34 PM #161111While we wait for the fix this workaround code might be of use to you:
https://www.prorealcode.com/topic/a-code-about-highs-of-last-ten-days/#post-160998
1 user thanked author for this post.
02/15/2021 at 4:13 PM #16150802/15/2021 at 4:14 PM #161509 -
AuthorPosts