Hello,
I just want to share my world trading session indicator. To keep price chart most clean as possible, this indicator is build to be added onto another chart just under price chart. It also display lunch time. It can work with many time frame, but M30, M15 or whatever less is better of course.
You just need to add “fill” in indicator properties for pretty display.
Have fun.
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 69 |
//--indicator name : aa_world_trading_session //--author : prorealcode pseudo : manual_ice //--version 1.0 //--PRT 10.3 or higher once ONsize=0.8 once LunchSize=0.2 //--EURO market once euroOpen=090000 once euroClos=173000 once euroLunchBegin=123000 once euroLunchEnd=130000 once euroOFF=2 euroON=euroOFF cEuro= time>euroOpen and time<euroClos if cEuro then cEuroLunch= time>euroLunchBegin and time<euroLunchEnd if cEuroLunch then euroON=euroON+LunchSize else euroON=euroON+ONsize endif if not cEuro[1] then //--start of session Drawtext("Euro",barindex+2,euroOFF+0.4) endif endif //--US market once usOpen=143000 //08h30 US time once usClos=220000 //16h00 us time once usLunchBegin=174500 //--typically 11h45 - 13h30 once usLunchEnd=193000 once usOFF=1 usON=usOFF cUs=time>usOpen and time<usClos if cUs then cUsLunch=time>usLunchBegin and time<usLunchEnd if cUsLunch then usON=usON+LunchSize else usON=usON+ONsize endif if not cUs[1] then //--start of session Drawtext("Us",barindex+2,usOFF+0.4) endif endif //--Asia1 market once asiaOpen=010000 once asiaClos=070000 once asiaLunchBegin=030000 once asiaLunchEnd=050000 once asiaOFF=0 //--default indicator level asiaON=asiaOFF cAsia=time>asiaOpen and time<asiaClos if cAsia then cAsiaLunch=time>asiaLunchBegin and time<asiaLunchEnd if cAsiaLunch then asiaON=asiaON+LunchSize else asiaON=asiaON+ONsize endif if not cAsia[1] then //--start of session Drawtext("Asia",barindex+2,asiaOFF+0.4) endif endif //-- with indicator "properties", add coloured fill between euroOFF and euroON, between usOFF and usON, and between asiaOFF and asiaON return euroON as "Euro ON", euroOFF as "Euro OFF", usON as "Us ON", usOFF as "Us OFF", asiaON as "Asia ON", asiaOFF as "Asia OFF" |
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
Regarding line68,
//– with indicator “properties”, add coloured fill between euroOFF and euroON, between usOFF and usON, and between asiaOFF and asiaON
Is there any way to permanently add color zone built in within code, so that we do not have to add color zone manually every time?
As far as I know, it is not possible to include “fill” inside an indicator.
But, since version v11.x, it is possible to draw rectangle with color, feel free to modify this indicator in this way. If you do that, be careful with number of rectangle to display, else indicator can become slow.