session high low indicator
Forums › ProRealTime English forum › ProBuilder support › session high low indicator
- This topic has 25 replies, 10 voices, and was last updated 4 years ago by Horizon_Edge.
-
-
06/28/2016 at 2:51 AM #9936
Hi,
I’m trying to build or find an indicator that will allow high and lows to be indicated within a specific time frame.
I have attached 2 images of examples I have with my MT4 platform but its inconvinent for me as I have to have 2 platforms open one for setup and another for trading. I would rather have everything on the one platform.
The sessions are as follows
0600-1000
1200-1500
1600-1800
2100-0500
If this can be done and its not too much trouble to do I would greatly appreciate it otherwise I may have to stop using PRT and find a different broker 🙁
Thanks for reading
06/28/2016 at 5:36 AM #994006/28/2016 at 11:39 AM #9954Hi,
Thanks for getting back to me.
I think the answer is both lol. I would like to see history of previous session highs and lows, where the highs and lows are isolated for each session.
For me price is the only indicator I use. I just want the platform to make it visually easier for me to see each session (intraday) high and low.
In Example 1 above the MT4 platform allows me to use 2 indicators. 1 allows me to block out price in the asian session, the second at the bottom just highlights session times.
In Example 2, all the session times are all highlighted on the chart, with horizontal line segmant at the highs and lows of the session
It doesnt have to look the same as above if not lines then boxes or timezones it doesnt matter as long as I can highlight the beginning and ending of each session.
Thanks
06/28/2016 at 12:20 PM #9960Something like this ?
1234567891011121314151617181920212223242526272829303132333435363738//DEVELOPMENT & GRAPH AREA ******************************************Session1TimeStart = 060000Session1TimeClose = 100000Session2TimeStart = 120000Session2TimeClose = 150000Session3TimeStart = 160000Session3TimeClose = 180000Session4TimeStart = 210000Session4TimeClose = 050000if time > Session1TimeStart and time < Session1TimeClose thenS1high = dhigh(0)S1low = dlow(0)endifif time > Session2TimeStart and time < Session2TimeClose thenS2high = dhigh(0)S2low = dlow(0)endifif time > Session3TimeStart and time < Session3TimeClose thenS3high = dhigh(0)S3low = dlow(0)endifif time > Session4TimeStart and time < Session4TimeClose thenS4high = dhigh(0)S4low = dlow(0)endifgraph S1high coloured (200,0,0) as "s1high"graph S1low coloured (200,0,0) as "S1low"graph S2high coloured (0,200,0) as "S2high"graph S2low coloured (0,200,0) as "S2low"graph S3high coloured (0,50,50) as "S3high"graph S3low coloured (0,50,50) as "S3low"graph S4high coloured (0,0,200) as "S4high"graph S4low coloured (0,0,200) as "S4low"1 user thanked author for this post.
06/28/2016 at 12:34 PM #996306/28/2016 at 12:45 PM #9964Or maybe like this? (maximum/minimum between 2 hours are something often asked, I always have this kind of code ready to be copy/paste 🙂 )
1234567891011121314151617Session1TimeStart = 060000Session1TimeClose = 100000if intradaybarindex=0 thenS1low=Dopen(0)S1high=Dopen(0)endifif time > Session1TimeStart and time < Session1TimeClose thenS1high = MAX(S1high,high)S1low = MIN(S1low,low)elseS1high = 0S1low = Dopen(0)*100endifRETURN S1high coloured (200,0,0) as "s1high", S1low coloured (200,0,0) as "S1low"Change drawing values to point mode and add colour fill between them.
1 user thanked author for this post.
06/28/2016 at 1:59 PM #996806/28/2016 at 2:46 PM #9970The code I gave is an example and must be completed by all the time sessions you want. Or you can create 3 same one with different SessionTimeStart and SessionTimeEnd.
Yes, you just need to add this indicator on price and “Change drawing values to point mode and add colour fill between them.”
1 user thanked author for this post.
01/18/2017 at 10:36 PM #21640Make sure Vertical autoscaling: use price only is ticked on the charts Price chart panel properties (wrench icon top left of the chart) and that you’ve unticked the necessary Colour Zone for the indicator
1 user thanked author for this post.
07/06/2017 at 10:05 AM #39935Tried to add code to new indicator, but getting programming error saying : an indicator code must end with the keyword RETURN to define what ti display.
07/06/2017 at 2:49 PM #3995607/06/2017 at 9:32 PM #39978Ok, So how can I get this indicator for my charts.
Darragh
07/07/2017 at 9:09 AM #39997With this modified code instead, converted to an indicator:
123456789101112131415161718192021222324252627282930313233//DEVELOPMENT & GRAPH AREA ******************************************Session1TimeStart = 060000Session1TimeClose = 100000Session2TimeStart = 120000Session2TimeClose = 150000Session3TimeStart = 160000Session3TimeClose = 180000Session4TimeStart = 210000Session4TimeClose = 050000if time > Session1TimeStart and time < Session1TimeClose thenS1high = dhigh(0)S1low = dlow(0)endifif time > Session2TimeStart and time < Session2TimeClose thenS2high = dhigh(0)S2low = dlow(0)endifif time > Session3TimeStart and time < Session3TimeClose thenS3high = dhigh(0)S3low = dlow(0)endifif time > Session4TimeStart and time < Session4TimeClose thenS4high = dhigh(0)S4low = dlow(0)endifreturn S1high coloured (200,0,0) as "s1high", S1low coloured (200,0,0) as "S1low",S2high coloured (0,200,0) as "S2high",S2low coloured (0,200,0) as "S2low",S3high coloured (0,50,50) as "S3high",S3low coloured (0,50,50) as "S3low",S4high coloured (0,0,200) as "S4high",S4low coloured (0,0,200) as "S4low"07/09/2017 at 10:11 PM #40184still not working, where exactly do I need to copy and paste it too.
07/10/2017 at 8:52 AM #40196 -
AuthorPosts
Find exclusive trading pro-tools on