RedeeCash TimeZones
- Indicators
- Patrick Odonnell Ingle
- Version: 1.2
- Updated: 3 September 2022
DATE | VERSION | DESCRIPTION OF CHANGES |
---|---|---|
2022-08-31 | 1.00 | Initial release. |
2022-09-01 | 1.01 (on the Indicator dialog, but is v1.1 on MQL5.COM) | Fixed New York active time |
2022-09-03 | 1.02 (on the Indicator dialog, but is v1.2 on MQL5.COM) | Fixed Sydney active on Saturday |
This indicator will show the active and inactive trading sessions as well as set global variables as whether the trading session is active (1) or inactive (0).
Using the iCustom library function, you can invoke this indicator from an Expert Advisor or Script, as follows,
// Invoke custom indicator iCustom(Symbol(),PERIOD_D1,"Market/RedeeCash_TimeZone",0,0,Blue,Red); // obtain the values of the global variables double NewYorkSessionIsActive = GlobalVariableGet("TZ-NewYork"); double LondonSessionIsActive = GlobalVariableGet("TZ-London"); double SydneySessionIsActive = GlobalVariableGet("TZ-Sydney"); double TokyoSessionIsActive = GlobalVariableGet("TZ-Tokyo");
The trading sessions show UTC time with their operating range in brackets. The HOME time indicator shows the local machine time with the current UTC time in bracket. The server time shows the broker server time. Both the HOME and SERVER are shown in BLUE and their colors do not change.
When the trading session is RED, the trading session is active. When the trading session is BLUE, the trading session inactive.
The global variables are set to 1 for active trading sessions and 0 for inactive trading sessions.