Inserted Code
//******************************************************************* // isMarketClosed // Usage in EA //******************************************************************* bool isMarketOpen() { // Last Tick is older than 100 seconds double seconds= MathAbs(TimeGMT()-TimeCurrent()); return seconds<100; } //******************************************************************* // isTradeAllowed // Usage in EA //******************************************************************* bool isTradeAllowed(string actSymbol) { return // Terminal has connection (TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) && // Actual symbol is allowed MarketInfo(actSymbol,MODE_TRADEALLOWED) && // General allowed=Smiley IsTradeAllowed() && AccountInfoInteger(ACCOUNT_TRADE_ALLOWED) && // Market is open isMarketOpen()) // OR Trading in Strategytester: Every time allowed! || IsTesting() ; }
Took me a time to build it... so hope useful for many guys.... tell me if you have improvements... or I have missed something...
Greetings and stay well in these times...
Vucking good EA coder... https://t.ly/AZjRM
#14 All Time Return:
665.1%