Friday Close and Monday Open Gap
Forums › ProRealTime English forum › ProBuilder support › Friday Close and Monday Open Gap
- This topic has 14 replies, 5 voices, and was last updated 1 year ago by robertogozzi.
-
-
03/09/2023 at 11:52 AM #21119803/09/2023 at 12:27 PM #211222
maybe you can draw a Rectangle ?
03/09/2023 at 12:30 PM #211227There you go:
12345678910111213DEFPARAM DrawOnLastBarOnly = trueIF OpenTime = 080000 AND OpenDayOfWeek = 5 THENBar8 = BarIndexcl = closeBar10 = Bar8op = clENDIFIF OpenTime = 100000 AND OpenDayOfWeek = 1 THENBar10 = BarIndexop = openENDIFDrawSegment(Bar8,cl,bar10,op)RETURN1 user thanked author for this post.
03/09/2023 at 2:08 PM #21124103/09/2023 at 2:26 PM #211242Hi,
Not knowing what TF you used and how much history you loaded, these are hypothetical items to check, just in case:
– is it a timeframe compatible, meaning having candles open/close timing compatible with these coded times? (so… not x ticks, not daily, etc…)
– and if yes, are there enough units loaded to have the first point last friday at 8 part of available history? (for example, if 1mn TF, having 10000 rather than only 1000 units)
(PS: from moderation point of view, moving the topic from French forum to English forum in a few minutes, thanks)
03/09/2023 at 2:42 PM #21124703/09/2023 at 2:49 PM #21124803/09/2023 at 3:07 PM #21125003/09/2023 at 3:15 PM #21125503/09/2023 at 3:22 PM #211257Friday Close Monday Open1234567891011DEFPARAM DrawOnLastBarOnly = trueIF OpenTime = 080000 AND OpenDayOfWeek = 5 THENBar8 = BarIndexcl = closeENDIFIF OpenTime = 100000 AND OpenDayOfWeek = 1 THENBar10 = BarIndexop = openENDIFDrawrectangle(Bar8,cl,bar10,op)RETURN1 user thanked author for this post.
03/09/2023 at 5:59 PM #21126703/09/2023 at 10:12 PM #21128103/10/2023 at 9:40 AM #211299This is a modified version of https://www.prorealcode.com/topic/friday-close-and-monday-open-gap/#post-211257:
123456789101112DEFPARAM DrawOnLastBarOnly = trueIF OpenTime = 080000 AND OpenDayOfWeek = 5 THENBar8p = Bar8Bar8 = BarIndexcl = closeENDIFIF OpenTime = 100000 AND OpenDayOfWeek = 1 THENBar10 = BarIndexop = openENDIFDrawrectangle(Bar8p,cl,bar10,op) coloured("Red",20) bordercolor("Cyan") style(line,2)RETURN20 is the transparency attribute (0=invisible, 255=max.visibility).
2 is the line thickness (1 to 5).
1 user thanked author for this post.
03/10/2023 at 11:34 AM #211306Thanks but it looks bit odd in the chart. It seems to be connecting all open and close of new week. I was expecting it to have individual shades for DClose of Saturday (AEST) and DOpen (Monday). Is it not possible to have a line that extend to current price area?
03/10/2023 at 12:57 PM #211317This version gets rid of some mess (when uncommenting line 1):
12345678910111213//DEFPARAM DrawOnLastBarOnly = trueIF OpenTime = 080000 AND OpenDayOfWeek = 5 THENBar8 = BarIndexcl = closeENDIFIF OpenTime = 100000 AND OpenDayOfWeek = 1 THENBar10 = BarIndexop = openENDIFIF Bar10 > Bar8 THENDrawrectangle(Bar8,cl,bar10,op) coloured("Red",20) bordercolor("Cyan") style(line,2)ENDIFRETURNOf course you will have to change those times, as they are CET (EU) times.
DCLOSE, DOPEN, etc… match the broker’s day start (which is now at 01:00, not 00:00). This means that 00:00 are still visible, but with OpenDayOfWeek they belong to the previous day, despite the date being correct.
-
AuthorPosts
Find exclusive trading pro-tools on