I've been working on this for a while today and I just can't find my mistake!
I modified an existing script that exports MT4 data and changed it a little. I added more pairs and removed the moving average export functionality.
Now I'm getting an error stating the parameter count is wrong. I've compared the original and my mod side to side for hours now and I think I just need another pair of eyes to look at it.
Any help is greatly appreciated. I attached both the original and my modification.
Doesn't look like you are handling arrays properly. array_price has 6 elements in the second dimension which are numbered from 0 to 5.
You are not referencing the second dimension in the right order as well as referencing a non-existent element 6.
EURGBP_OPEN = array_price70;
EURGBP_CLOSE = array_price71;
EURGBP_HIGH = array_price72;
EURGBP_LOW = array_price73;
EURGBP_Volume = array_price74;
The correct order should be 0-5, and no number 6:
0 - time,
1 - open,
2 - low,
3 - high,
4 - close,
5 - volume.
Can't tell if this is related to the error you are seeing, but this is something you need to fix.
Thank you, Blogzr. The first script was created for use in conjunction with the DDE FX Multi-Fib Calculator (http://stideas.com/Free%20Trading%20Tools.htm). It wasn't working correctly for me in either OOo or Excel so I tried to take the format and create my own, much more simple version from the provided. I'm going to revise the existing code and... arrays
notwithstanding, it looks like the error I keep getting is related to
the fileWrite command at the very end. I cant, for the life of me,
figure out what I'm doing wrong.
I'm going to go ahead and revise the array assignments and let you know the result.
Thank you many times, blogzr3...
Also you don't need multiple arrays in array_price70, 71, 72 etc - you only need one for each symbol/timeframe combination.
If fact, for what you are doing, you don't need arrays at all - just reference iOpen(), iClose() etc directly.
The compilation errors are most likely red-herrings :)
I had a sneaking suspicion that was the case...
I'll give it a shot. And thanks again.
For what it's worth, here's the new one with the updated arrays.
Alright. I removed all the array-related commands and I believe it's all coded correctly. I'm still getting an invalid parameter error at the very end!! Maybe there's something wrong with the filewrite command?!
I solved this a while back. Each filewrite command can only use 63 parameters. I was using about 100 so I had to split it into two different filewrite commands
Thanks again for your help!
To add comments, please log in or register