//+------------------------------------------------------------------+ //| $_TRO_Time | //| | //| Copyright © 2008, Avery T. Horton, Jr. aka TheRumpledOne | //| Copyright © 2020, Avery T. Horton, Jr. aka TheRumpledOne | //| | //| PO BOX 1673, BANDON, OR 97411 | //| | //| GIFTS AND DONATIONS ACCEPTED | //| All my indicators should be considered donationware. That is | //| you are free to use them for your personal use, and are | //| under no obligation to pay for them. However, if you do find | //| this or any of my other indicators help you with your trading | //| then any Gift or Donation as a show of appreciation is | //| gratefully accepted. | //| | //| Gifts or Donations also keep me motivated in producing more | //| great free indicators. :-) | //| | //| PayPal - THERUMPLEDONE@GMAIL.COM | //+------------------------------------------------------------------+ //| Use http://tradersway.com?ib=1213262 | //| as your forex broker...tell them therumpledone sent you! | //+------------------------------------------------------------------+ //| DO NOT DISTRIBUTE THIS CODE BY ANY MEANS - tell people to | //| go to www.kreslik.com for the latest indicator updates | //+------------------------------------------------------------------+ #property copyright "Copyright © 2020, Avery T. Horton, Jr. aka TRO" #property link "http://www.therumpledone.com/" #property description "TRO - TheRumpledOne" #property description "DO NOT POST THIS ON OTHER FORUMS" #property description "www.kreslik.com is where TRO indicators can be found" //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 0 input bool Show_Zones = true ; input bool Show_Seasons = true ; input string HOUR00 = "Asian Kill Zone" ; input string HOUR01 = "Asian Kill Zone" ; input string HOUR02 = "Asian Kill Zone" ; input string HOUR03 = "Asian Session" ; input string HOUR04 = "Asian Session" ; input string HOUR05 = "Asian Session" ; input string HOUR06 = "Asian Session" ; input string HOUR07 = "London Open KILL ZONE" ; input string HOUR08 = "London Open KILL ZONE" ; input string HOUR09 = "London Session" ; input string HOUR10 = "London Session" ; input string HOUR11 = "London Session" ; input string HOUR12 = "NY Open KILL ZONE" ; input string HOUR13 = "NY Open KILL ZONE" ; input string HOUR14 = "NY Session" ; input string HOUR15 = "NY Session" ; input string HOUR16 = "London Close KILL ZONE" ; input string HOUR17 = "London Close KILL ZONE" ; input string HOUR18 = "NY Session" ; input string HOUR19 = "NY Session" ; input string HOUR20 = "NY Session" ; input string HOUR21 = "NY Session" ; input string HOUR22 = "NY Session" ; input string HOUR23 = "Asian Kill Zone" ; input string MONTH01 = "The Pound typically forms a bottom in early to late March and then moves higher into the end of April." ; input string MONTH02 = "The Pound typically forms a bottom in early to late March and then moves higher into the end of April." ; input string MONTH03 = "The Pound typically forms a bottom in early to late March and then moves higher into the end of April." ; input string MONTH04 = "The Pound typically forms a bottom in early to late March and then moves higher into the end of April." ; input string MONTH05 = "Early May to mid-May is usually a bearish time." ; input string MONTH06 = "A bottom typically forms again in mid-May we see a move higher into early August." ; input string MONTH07 = "A bottom typically forms again in mid-May we see a move higher into early August." ; input string MONTH08 = "Price usually peak early in August and decline into early September." ; input string MONTH09 = "Price usually peak early in August and decline into early September." ; input string MONTH10 = "After October our averages diverge with the short-term thus making the seasonal tendencies less concise and less reliable during this time." ; input string MONTH11 = "Averages re-align to form a top in early November and the price slides into mid-to-late November. After this the averages diverge again." ; input string MONTH12 = "Averages re-align to form a top in early November and the price slides into mid-to-late November. After this the averages diverge again." ; datetime tTime ; int elapsed ,period ; string symbol, KILLZONE, SEASON ; int GMTHOUR, GMTMONTH ; //+------------------------------------------------------------------+ int init() { symbol = Symbol() ; period = Period() ; tTime = 0 ; deinit(); return(0); } //+------------------------------------------------------------------+ int deinit() { TRO() ; return(0); } //+------------------------------------------------------------------+ int start() { string sTimeGMT = TimeToStr(TimeGMT() ); // GMT time string sTimeCurrent = TimeToStr(TimeCurrent() ); // server time string sTimeLocal = TimeToStr(TimeLocal() ); // local computer time string sTimeBar = TimeToStr(Time[0] ); // current bar time elapsed = TimeLocal() - tTime ; string sTimeLeft ; double ii; int m,s,h,d; m=iTime(symbol,period,0)+period*60-TimeCurrent(); ii=m/60.0; s=m%60; m=(m-m%60)/60; h=m/60; m=m-(h*60); d=h/24; h=h-(d*24); if(period <= PERIOD_D1) { sTimeLeft = h+"h " +m+"m "+s+ "s" ; } else { sTimeLeft = d+"d " +h+"h " +m+"m " ; } KILLZONE = ""; SEASON = ""; if(Show_Zones) { GMTHOUR = TimeHour(TimeGMT()); KILLZONE = KillZone(GMTHOUR) ; } if(Show_Seasons) { GMTMONTH = TimeMonth(TimeGMT()); SEASON = Seasons(GMTMONTH); } Comment( "BAR........... " + sTimeBar + "\n" + "SERVER..... " + sTimeCurrent + "\n" + "LOCAL....... " + sTimeLocal + "\n" + "GMT.......... " + sTimeGMT + "\n" + "BAR ENDS... " + sTimeLeft + "\n" + KILLZONE + "\n" + SEASON ); tTime = TimeLocal() ; return(0); } //+------------------------------------------------------------------+ string KillZone(int tf) { string tfs; switch(tf) { case 00: tfs=HOUR00 ; break; case 01: tfs=HOUR01 ; break; case 02: tfs=HOUR02 ; break; case 03: tfs=HOUR03 ; break; case 04: tfs=HOUR04 ; break; case 05: tfs=HOUR05 ; break; case 06: tfs=HOUR06 ; break; case 07: tfs=HOUR07 ; break; case 08: tfs=HOUR08 ; break; case 09: tfs=HOUR09 ; break; case 10: tfs=HOUR10 ; break; case 11: tfs=HOUR11 ; break; case 12: tfs=HOUR12 ; break; case 13: tfs=HOUR13 ; break; case 14: tfs=HOUR14 ; break; case 15: tfs=HOUR15 ; break; case 16: tfs=HOUR16 ; break; case 17: tfs=HOUR17 ; break; case 18: tfs=HOUR18 ; break; case 19: tfs=HOUR19 ; break; case 20: tfs=HOUR20 ; break; case 21: tfs=HOUR21 ; break; case 22: tfs=HOUR22 ; break; case 23: tfs=HOUR23 ; break; tfs="No Zone"; } return(tfs); } //+------------------------------------------------------------------+ string Seasons(int tf) { string tfs; switch(tf) { case 01: tfs=MONTH01 ; break; case 02: tfs=MONTH02 ; break; case 03: tfs=MONTH03 ; break; case 04: tfs=MONTH04 ; break; case 05: tfs=MONTH05 ; break; case 06: tfs=MONTH06 ; break; case 07: tfs=MONTH07 ; break; case 08: tfs=MONTH08 ; break; case 09: tfs=MONTH09 ; break; case 10: tfs=MONTH10 ; break; case 11: tfs=MONTH11 ; break; case 12: tfs=MONTH12 ; break; tfs="No Zone"; } return(tfs); } //+------------------------------------------------------------------+ void TRO() { string TRO_OBJ = "TROTAG" ; ObjectCreate(TRO_OBJ, OBJ_LABEL, 0, 0, 0); ObjectSetText(TRO_OBJ, CharToStr(78) , 12 , "Wingdings", DimGray ); ObjectSet(TRO_OBJ, OBJPROP_CORNER, 3); ObjectSet(TRO_OBJ, OBJPROP_XDISTANCE, 5 ); ObjectSet(TRO_OBJ, OBJPROP_YDISTANCE, 5 ); } //+------------------------------------------------------------------+ /* string sTimeCurrent = TimeToStr(TimeCurrent(),TIME_SECONDS); // server time string sTimeLocal = TimeToStr(TimeLocal(),TIME_SECONDS); // local computer time string sTimeBar = TimeToStr(Time[0],TIME_SECONDS); // current bar time */