Richard / Publications
Forum
How to drop a trailing zero (in mql5) like Excel?
How can I drop a trailing zero from a text string (in mql5) that will be written to a csv file. For example: "0.10" to "0.1" Basically, I want to save the mql5 to the csv in the same format that Excel exports to csv
MQL5 Strategy Tester changes Start Time to bar previous to current bar
MQL5 Strategy Tester changes Start Time to bar previous to current bar. Start Time can be set weeks, months or even years earlier, but it still changes. So far, it is happening in higher timeframes (Monthly, Weekly). Why does this occur and how can it be prevented
MT5 won't take trades on monthly index data
I have a simple EA that closes a trade at the start of a new bar & then opens a new one. It works fine in Strategy Tester on all timeframes except Monthly (it takes no trades at all). Apparently, it changes Start Time to the current date which seems to explain why it doesn't take trades. Why does it
FileWriteString mystery wrong data written
I am writing to a CSV file and for some reason it is writing the wrong information. The string to be written contains data such as 0.59;0.37;0.04 but instead 0.00;0.00;0.00 is written. I confirmed during debugging that the correct information is contained in the string right before it is written
arrays are passed by reference only error
I am converting a build 509 indicator to 610 and am getting the error: "arrays are passed by reference only" for lpRect in GetClientRect. How can I fix it? int GetClientRect(int hWnd,int lpRect[]);
what's wrong with this array initialization?
it is declared global int tflist[]; it is initialized in OnInit tflist[ 8 ]={ PERIOD_M1 , PERIOD_M5 , PERIOD_M10 , PERIOD_M15 , PERIOD_M30 , PERIOD_H1 , PERIOD_H4 , PERIOD_D1 }; it generates this error: '{' - expression expected. What am I doing wrong
ZUP v146 or higher for build 610+
Does anyone know if there is a version of ZUP by Eugeni Neumoin (nen) that is compatible with build 610+? I've heard v146 ex4 might work but I haven't been able to find it. The mq4 is preferable because I need to alter the code for other purposes
ZigZag depth issue
I compiled a pre 600 mq4; there were no errors, no warnings. When I attached it to a chart, nothing is displayed. It is supposed to draw trendlines; it uses ZigZag.mq4. After some checking , I realized that if the depth in ZigZag is set below 4, it no longer displays the trendline and ZigZag is
Build 600 breaks existing code; what needs to be changed?
I have a client saying that code working in Build 509 is now causing problems on Build 600 (MT4 freezes). I've heard of other people experiencing problems. How many indicators and EAs might this affect, dozens, thousands? What did MQL do to MT4 that causes this problem? If Build 600 breaks existing
how to restrict dates shown in chart
Is there a way to restrict the dates loaded into a chart? For example, if I only want to use price data from 02 Jan 2010 to 30 Apr 2010, how would I do that