Drawing a horizontal line at the close of a H1 candle on the Dow
Forums › ProRealTime English forum › ProBuilder support › Drawing a horizontal line at the close of a H1 candle on the Dow
- This topic has 15 replies, 4 voices, and was last updated 6 years ago by Nicolas.
-
-
07/19/2017 at 9:40 AM #41051
Hi
Is there any code available for drawing a simple horizontal line across a chart, based upon the close of a candle at a set time each day? For example, a horizontal line at the close of the 1pm H1 candle on the Dow? The line would need to ‘expire’ (delete itself) when the next days line is drawn.
Many thanks
07/19/2017 at 10:15 AM #4105307/20/2017 at 7:55 PM #41188Thank you, Nicolas.
Much appreciated.
07/24/2017 at 2:11 PM #4150607/24/2017 at 2:27 PM #41510Because the separate don’t adapt automatically its scale with plotted object like horizontal line. If you change the last line of the code with:
1return valueit should adapt itself automatically.
Why it doesn’t show on the main pane? .. be sure the instrument has quote at time it saves the value (1 pm in the code).
07/24/2017 at 2:49 PM #41511Thanks Nicolas. That works, just as the original one works.
I wish to plot the Open, High and Low of the first 30 minutes of trading and want it to be displayed on a 5 or 10 min chart. Is this possible?
Also, I wish to plot yesterday’s Open, High and Low on continuous data ie will have to be able to specify open hours and should also be able to display in various time frames. Is this possible?
I realize the requests are much more than the original topic – would it be preferable to start these requests as separate ?
Thank you.
07/24/2017 at 3:31 PM #4151401/17/2018 at 12:31 PM #5970801/17/2018 at 12:35 PM #59709i mean if i want to change the time easily 130000 to 150000
01/17/2018 at 1:15 PM #5971201/17/2018 at 7:01 PM #59732hi @nicolas,
thanks for getting back.. what i meant was.. adding two lines on the chart one at 130000 and one at 150000. and a way to switch those times (add on the variables- like tick or untick) so we can either see two lines on the chart or we can untick to see one?!?! tried below but its a big failure!!
12345678910defparam drawonlastbaronly=truemytime = 150000mytime1 = 130000if time=mytime and mytime1 thenvalue=closeendifdrawhline(value)return01/18/2018 at 10:08 AM #59783Ok, here is the modified code for that purpose:(draw0 and draw1 boolean variables been introduced)
123456789101112131415161718192021defparam drawonlastbaronly=truemytime0 = 150000draw0 = 1 //1=true, 0=falsemytime1 = 130000draw1 = 0 //1=true, 0=falseif time=mytime0 thenvalue0=closeendifif draw0 thendrawhline(value0)endifif time=mytime1 thenvalue1=closeendifif draw1 thendrawhline(value1)endifreturn1 user thanked author for this post.
01/18/2018 at 11:09 AM #59792its only show one line.. not sure why. and boolean doesnt seem to work!
01/18/2018 at 2:05 PM #5980201/22/2018 at 2:39 AM #60115hi nicolas,
still stuggling to get the two lines it only show mytime0 on the chart and mytime1 doesnt show..
please cant you see attached pic? is that the correct way to add boolean???
-
AuthorPosts
Find exclusive trading pro-tools on