Open Range Euro
Forums › ProRealTime English forum › ProBuilder support › Open Range Euro
- This topic has 6 replies, 2 voices, and was last updated 5 years ago by Razz.
Viewing 7 posts - 1 through 7 (of 7 total)
-
-
11/12/2019 at 6:58 PM #11262311/12/2019 at 7:01 PM #112626Open Range Euro123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117// Opening Range EUR with Close and Open.// Added some changes and features.// - segment for opening price;// - segment for yesterday's closing price;// - Automatic detection of the timeframe;// - Automatic configuration for 1-5-10-15-30min charts.// 17.06.2019 (Release 1.1)// Thomas Geisler// Sharing ProRealTime knowledge (alt+16)// Original basis was Pre-Market EUR (Opening Range) | Graph Indicator Ver. 1.0// from Swapping// --- property settings//Info = 1 // (0=false; 1=true)//Delta = 10 // gap number/rectangle//Alpha = 255 // transparency letter//HighLow = 1 // (0=false; 1=true)//OpenClose = 1 // (0=false; 1=true)// --- endDefParam CalculateOnLastBars = 1400 // enough for one day (23h) when using 1min timeframe// --- initalpha = max(alpha,0)alpha = min(alpha,255)// --- end//Automatic time detectiononce NbBar = 1if BarIndex < NbBar+2 thenMyDay=opendaydayminutes = 1440*(MyDay-MyDay[1])MyHour=openhourhourminutes = 60*(MyHour-MyHour[1])MyMin=openminutebarminutes = MyMin - MyMin[1] + hourminutes + dayminutesbarminutes=abs(barminutes)Mybarminutes = lowest[NbBar](barminutes)[1]endif// Select timeframe between 1 and max 30 minutes to define the parameters for drawingif Mybarminutes = 1 thenFrame = 60myStart = 080100elsif Mybarminutes = 5 then // 5 minutesFrame = 12 // 12 candelsmyStart = 080500 // opening plus 5 minelsif Mybarminutes = 10 thenFrame = 6myStart = 081000elsif Mybarminutes = 15 thenFrame = 4myStart = 081500elsif Mybarminutes = 30 thenFrame = 2myStart = 083000endifstarttime = myStart // 08h00 Depending on the timeframeendtime = 090000 // 09h00if 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 intradaybarindex = 0 thenhh = 0ll = 0endifif time = 173000 then //Close Yesterday at time 17:30cl = closeendifif date = today and time > endtime then //draw Box OpenRange (OPR) only for todayDrawRectangle(startbar,hh,endbar,ll) coloured(0,255,255,alpha) // alpha (transparence)endifif date = today and time = endtime then // High/Low/Opening only for todayupper = highest[Frame](high)lower = lowest[Frame](low)op = closedif = round(abs(upper-lower))info = info // draw the info OPR, High, Low, Using Timeframe as textelsif info = 1 thenDrawText("OPR #dif#pts",startbar+5,upper+(delta+5),SansSerif,Standard,12) coloured(255,0,255,alpha)DrawText("#hh#",startbar+5,upper+(delta),SansSerif,Standard,12) coloured(0,255,255,alpha)DrawText("#ll#",startbar+5,lower-(delta),SansSerif,Standard,12) coloured(0,255,255,alpha)//DrawText("Timeframe #Time1o5o10o15# min.",startbar+5,lower-(delta+5),SansSerif,Standard,12) coloured(255,0,255,alpha)endifif date = today and time >= endtime and time <= 220000 thenIf HighLow = 1 then// Draw Segment High,Low and Opening from OPR, as Support/Resist, to select timeDrawSegment(barindex-HighLow,upper,barindex,upper) coloured(0,255,255,alpha) // High OPRDrawSegment(barindex-HighLow,lower,barindex,lower) coloured(0,255,255,alpha) // Low OPRendifIf OpenClose = 1 then// Draw Segment High,Low and Opening from OPR, as Support/Resist, to select timeDrawSegment(barindex-OpenClose,op,barindex,op) coloured(255,0,204,alpha) // OpeningDrawSegment(barindex-OpenClose,cl,barindex,cl) coloured(255,0,0,alpha) //Close Yesterdayendifendifreturn11/12/2019 at 7:55 PM #112628
To draw a horizontal line you can use DRAWHLINE, or DRAWSEGMENT between two points.
You need to know the price level where they are to be drawn.
11/12/2019 at 8:45 PM #11263211/13/2019 at 5:57 PM #11271411/14/2019 at 1:13 AM #112743To draw a line from 080000 to 220000 you must tell where (price level) you want it to be drawn.
This example will draw it on the OPEN at 080000, till 220000:
12345678IF OpenTime = 080000 THENOpenPrice = openbar8 = barindexENDIFIF OpenTime >= 080000 AND OpenTime <= 220000 THENDRAWSEGMENT(bar8,OpenPrice,barindex,OpenPrice) coloured(0,128,0,255) //GREEN colour, 100% visibleENDIFRETURN11/14/2019 at 5:53 PM #112821 -
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)
Find exclusive trading pro-tools on
Similar topics: