Help for graphical indicators development version 10.3
Forums › ProRealTime English forum › ProBuilder support › Help for graphical indicators development version 10.3
- This topic has 41 replies, 13 voices, and was last updated 5 years ago by dan55.
-
-
03/21/2017 at 5:32 PM #29335
Sorry for the misunderstanding , but in the example screen shot the arrow and the circle are drawn by hand on the 1 hour chart , and they show up on the 5 mins …
My question is :
Can a segment drawn using the code shown running on the 1 hour chart show through on lower time frames , in the same way it can manually…
I assume it cannot be done ?
Thanks
03/21/2017 at 7:53 PM #2935303/21/2017 at 9:03 PM #2936103/22/2017 at 8:02 PM #29503Hi Nicolas, in addition to my pending post in the Indicator section, I have a problem I hope you can help me with- because after two days I have given up. I discovered that the DRAWSEGMENT is not updating Live, but stops the moment you put on the indicator, I suspect it’s the same problem with the drawrectangle(?) though I haven’t been able to live test the drawrectangle between 8 and 9 am. I also change the code a bit from the pending post- I think we need to solve this issue first before releasing the indicator post. Also the stop time is not correct. if time 135000 the yesterdays draw of the segment stops at 220000?
Cheers Kasper
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263defparam drawonlastbaronly = falseonce upper=0once lower=0starttime = 080000endtime = 090000If Time = endtime thenupper=highest[12](high)lower=lowest[12](low)dif=round(abs((lower-upper)*pipsize*pointvalue))//bars=barindexDRAWTEXT("#dif# pips", barindex-6, upper+10,SansSerif,bold, 16)DRAWARROWDOWN (barindex-6,upper+5)DRAWARROWup (barindex-6,upper+15)DRAWTEXT("#upper#", barindex-6, upper,SansSerif,bold, 16)DRAWTEXT("#lower#", barindex-6, lower,SansSerif,bold, 16)endif//if time >=080500 and Time <=090000 then////backgroundcolor(0,255,255)//DRAWRECTANGLE(barindex-6,upper,barindex-6,lower) COLOURED(0,255,0)//endifif time >=090000 and Time <=135000 thencount=count+1DRAWsegment(barindex,upper,barindex+count,upper)coloured(0,0,0)DRAWsegment(barindex,lower,barindex+count,lower)coloured(0,0,0)elsecount=0endifif intradaybarindex=0 thenhh = 0ll = 0alreadydrawn = 0endifif time=starttime thenstartbar=barindexendifif time=endtime thenendbar=barindexendifif time>=starttime and time<=endtime thenif high>hh thenhh = highendifif low<ll or ll=0 thenll = lowendifendifif time>endtime and alreadydrawn=0 thendrawrectangle(startbar,hh,endbar,ll) coloured(0,255,255)alreadydrawn=1endifRETURN03/22/2017 at 8:11 PM #29505Kasper,
It may not be a good hint, but at lines 25 and 26 you are drawing segment from now (barindex) to future bars that still don’t exist (barindex+count) and it’s not possible to draw at the right of the price chart (in the future)..
03/22/2017 at 8:20 PM #29507To replace the impossibility to draw segment to the right of current live candle, the only way I could program a work around this in my codes was to add an “if” statement at the following candle, checking when there should have been a piece of “future” segment from previous candle, and draw it from there “to the left”, effectively still updating the segment as history develops, but with the future bits appearing “one candle late in time, but at the right place”. A bit heavy, but worth it in case the segment is really important to you.
03/22/2017 at 8:23 PM #29508Okay, I can understand that we cannot draw on barindex in the future, but it should be possible to draw the line as we go along- until 22 pm
03/22/2017 at 8:27 PM #29509hahaha- turned out to be a good hint 😀 😀
Can you dismiss the pending post? I want to make a new one with the new code
12DRAWsegment(barindex-count,upper,barindex,upper)coloured(0,0,0)DRAWsegment(barindex-count,lower,barindex,lower)coloured(0,0,0)03/22/2017 at 8:48 PM #2951304/09/2017 at 9:13 AM #31458hi nicholas,
Could you please help me?
I try to write a code that will be done – an upward arrow – wherever the price closes above the high of the previous candle.
That is, in fact, it will signify any “break-in” of the price.The code is attached.
The result was not for what to attach …
The software has drawn me some kind of unclear line on the graph …I thank you very much for your help.
great day.
Chaim.12345678910111213for variable = 1 to barindex doif close[variable] > high[variable-1] thendrawarrowup(barindex,low-0.2)endifnextreturn04/09/2017 at 9:33 AM #31468Hello again, Nicholas.
I got a result with arrows, attached.
But the condition I am asking is not related to the outcome.I would be very grateful if you could take a look at the code I added in the previous post.
And write to me why it does not work.Thank you very much in advance for your help.
1234567891011121314for variable = 1 to barindex doif close[variable] > high[variable-1] thendrawarrowup (barindex,low-0.5)endifnextreturn04/09/2017 at 7:18 PM #3153404/09/2017 at 7:28 PM #3153504/09/2017 at 7:55 PM #3153904/09/2017 at 8:33 PM #31540 -
AuthorPosts
Find exclusive trading pro-tools on