► This Indicator draws a rectangle around the candlesticks formed during the Pre-opening of the American Session, it provides the minimum, maximum values as well as the difference and draws segments from the highest and the lowest
until the closing of the American Session…
[Properties] Two checkboxes
– “Info” Shows or hides alphanumeric information
– “Segment” Shows or hides the lines (higher / lower)
Two variables used to
– “Alpha” Adjust the transparency of text and lines (0 to 255)
– “Delta” Adjusts the information (above and below) of the rectangle
(to adjust according to the selected asset)
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
// Pre-Market USA (Opening Range) | Graph Indicator // 04.01.2019 (Release 1.0) // Swapping @ www.forexswap.fr // Sharing ProRealTime knowledge (alt+16) DefParam CalculateOnLastBars = 150 // (visualisation en UT 5mn sur une seule journée) // --- property settings Info = 1 // (0=false; 1=true) Delta = 10 // gap number/rectangle Alpha = 180 // transparency letter Segment = 1 // (0=false; 1=true) // --- end starttime = 140500 // 14h05 plage américaine (Nasdaq, S&P, Dowjones, ect...) endtime = 153000 // 15h30 // --- init alpha = max(alpha,0) alpha = min(alpha,255) // --- end if time = starttime then startbar = barindex endif if time = endtime then endbar = barindex endif if time >= starttime and time <= endtime then if high > hh then hh = high endif if low < ll or ll = 0 then ll = low endif endif hh = round(hh) // résultat valeur arrondi ll = round(ll) // résultat valeur arrondi if intradaybarindex = 0 then hh = 0 ll = 0 endif if time > endtime then DrawRectangle(startbar,hh,endbar,ll) coloured(0,255,255,alpha) // alpha (transparence) endif if time = endtime then upper = highest[18](high) // 18 Chandeliers de 5mn dans 90 minutes lower = lowest[18](low) dif = round(abs(upper-lower)) info = info // Visualisation des valeurs Alpha Numériques elsif info = 1 then DrawText("OPR #dif#pts",startbar+5,upper+(delta+dif/2),SansSerif,Bold,11) coloured(150,150,150,alpha) DrawText("#hh#",startbar+5,upper+(delta),SansSerif,Standard,11) coloured(250,150,100,alpha) DrawText("#ll#",startbar+5,lower-(delta),SansSerif,Standard,11) coloured(250,150,100,alpha) endif if time >= 154000 and time <= 220500 then segment = segment // Visualisation Segment "Haut/Bas" OPR de 15h30 à 22h00 DrawSegment(barindex-segment,upper,barindex,upper) coloured(250,150,100,alpha) // Ligne Supérieure OPR (Résistance) DrawSegment(barindex-segment,lower,barindex,lower) coloured(250,150,100,alpha) // Ligne Inférieure OPR (Support) endif return |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
hi how to convert proreal code to mt4 indicator for pre market session usa indicator
Hi, we dont offer MT4 programming assistance, but still you can ask for private paid programming on this page: https://www.prorealcode.com/trading-programming-services/
Hi,
thanks for the code. Do you have an idea, if you can also draw pre-market data on chart for US shares?
Thanks & Kind Regards,
Alex
Hello swapping. Very good idea. Can I use and modify the code? I would like to add a few more things. Different Timeframes, Open, Close.
Hello swapping the indicator is very good! Can you tell me how I can add 2 lines in the distance of the range to the high and low?
Have the currently solved so is not very nice.
STL=lower-Dif
STS=upper+Dif
return STL as “STL”,STS as “STS”
Thanks