Forums › ProRealTime English forum › ProBuilder support › Opening range indicator asian/europe session (with 2 profit targets) › Reply To: Opening range indicator asian/europe session (with 2 profit targets)
05/31/2018 at 4:36 PM
#71882
Thank you again for your help!
I have tried to combine this code with another that i have found on this website in order to make my own custom range box.
It works pretty well except a little bug: it does not draw properly the last target from below the range (not bug however for the upper target).
How could i fix this?
open range box with targets
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
once hh=undefined once ll=undefined once hh1=undefined once ll1=undefined once hh2=undefined once ll2=undefined once hh3=undefined once ll3=undefined starttime = 050000 endtime = 080000 if intradaybarindex=0 then hh = 0 ll = 0 alreadydrawn = 0 endif if time=starttime then startbar=barindex endif if time=endtime then endbar=barindex endif if time>=starttime and time<=endtime then if high + 5*pipsize>hh then hh = high + 5*pipsize endif if low - 5*pipsize<ll or ll=0 then ll = low - 5*pipsize endif lerange=(hh-ll)/2 else hh=hh ll=ll hh1=hh+lerange ll1=ll-lerange hh2=hh+2*lerange ll2=ll-2*lerange hh3=hh+3*lerange ll3=ll-3*lerange endif if time>endtime and alreadydrawn=0 then drawrectangle(startbar,hh,endbar,ll) alreadydrawn=1 endif return hh as "Maxi période de cotation", ll as "Mini période de cotation", hh1 as "Maxi1" ,ll1 as "Mini1",hh2 as "Maxi2" ,ll2 as "Mini2",hh3 as "Maxi3" ,ll3 as "Mini3" |