Chrispine Oburu / Publications
Forum
Mql5 code to get random items from an array
I got the following array string days[]= { "Sunday" , "Monday" , "Tuesday" , "Wednesday" , "Thursday" , "Friday" , "Saturday" }; how can I get a random array of three items
Mql5 Arrays does not free memory in a for loop
I have EA which prints out Interest Rate Decision of various countries, I have a for loop which loops through 28 pairs and when the news is true it prints out. For example today there is "ECB Interest Rate Decision" so I expect only pairs with "EUR" to return true but all others are returning true
Merge two arrays
I got a code to get the economic calendar of the base currency and quote currency below void OnStart (){ string currencybase = StringSubstr ( _Symbol , 0 , 3 ) ; string currencyquote = StringSubstr ( _Symbol , 3 , 3 ) ; datetime curdatetime = TimeTradeServer (); datetime
Expression has no effect
I am trying to set my bot not to trade on certain days like on weekends and Christmas day, my line not to trade on Christmas and New Year is raising a warning of expression has no effect, how can I correct it? bool allowed(){ MqlDateTime stm; datetime tm= TimeCurrent (stm); bool open =