Forum

Writing contents of frame to file

I've been trying to figure out how to write data during optimization into file for about a week. I've tried paying people in Freelance section to figure it out. They don't understand it either. I want to write data on every tick into the Frame() and then write all of the data into a file. First I

Writing contents of a variable to file during optimization

Hello. I'm trying to figure out how to write data from a variable for every pass in an optimization simultaneously on every tick to a file. I am banging my head against the wall trying to figure this out. This is my pathetic attempt to make something happen double currentAsk; void OnTick () {

Loop question

Hello. I found this script online and I have a question. for ( int j = 2 ; j <= 10 ; j = j + 2 ) { Print ( "The value of j is " + ( string ) j + "." ); } It is supposed to print 2,4,6,8,10. However I am confused because j+2 is included within the loop logic. So the way it looks to

Converting an array index value into a variable?

Hi, I'm just learning MQL5 and I have a question that has got me stuck. I'm trying to write a basic script that adds up all of the price values within an array //+------------------------------------------------------------------+ //| Script program start function

Finding maximum value in a loop

Hello, I'm currently trying to write a script that prints the maximum price within the last 100 days. I know that ArrayMaximum exists but I want to avoid using it for now. There is some error in the code that I cannot find. Currently I am only getting a " 'for' - semicolon expected " error on for

Write trading data to file for every parameter set during an mt5 optimization?

Hello. I am trying to get my EA to write data to a file during optimization, however while optimizing it only writes the data of a single parameter set within the optimization. Is it possible to write data from all parameter sets within the optimization simultaneously

MT4 strategy tester reports no results and no errors

I'm trying to load an EA into the Mt4's strategy tester and it shows the bar chart ticking forward and completes the test with no errors in the journal but there is also no results for the test. I've tried a variety of known working EAs and the result is the same. I have the history downloaded or it