You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
. . . I'm curious, how did you find the offset? . . .
I didn't. AllMarketData said the record length was 1936 characters (or bytes). Once you read the first twelve characters (which contains the symbol's name as defined by the broker) of the first record, you needed to advance 1924 characters (or bytes) to the next record.
. . . When I looked at symbols.raw in notepad I didn't see the symbols the way it comes out in the output. I did see for example "EURCHF" in symbols.raw but my output when I write all the symbols array to a file appears as "EURCHF." -- which is how my broker writes it.
I didn't. AllMarketData said the record length was 1936 characters (or bytes). Once you read the first twelve characters (which contains the symbol's name as defined by the broker) of the first record, you needed to advance 1924 characters (or bytes) to the next record.
That makes sense, but how did AllMarketData know the record length?
So long as what you see in the output is what your broker has defined as the symbol name. Did you confirm that "EURCHF." is the proper symbol name? Do you see the period in the symbol name in MT4's Market Watch window or when you open a chart for that symbol?
I finished a draft of the code. I can't test it since the markets are closed but the init() seems to work fine.
I think there is a slight problem with my approach. Since I'm going to use the custom indicator on only one chart, then the files will update only when a new tick comes in to that chart. This is really not an issue for my analysis purposes, but I would feel much better if I could get a more real-time experience. Would it be possible to make start() run at fixed intervals instead of at the arrival of a new tick? What if I use some sort of timing system and an infinit loop inside start()?
Btw, my other charting software updates its charts (that it draws from my data) no faster than every second -- so this is the bottle neck.
I finished a draft of the code. I can't test it since the markets are closed but the init() seems to work fine.
Can't you make it into an EA and test in the Strategy Tester ?
Good idea!
Can't you make it into an EA and test in the Strategy Tester ?
No...
It won't work in the tester because I've used the iClose(), iHigh(), etc., functions that work on the real-time charts -- which are frozen atm.
There is a problem with my start(). In the output it looks like FileSeek() is not seeking properly:
I don't get what went wrong. I used the same logic of my code that handles only the current chart:
Please, any advise?
Now, I'm 90% sure the problem is in keeping track of the values of each file. Erroneously, I managed the timestamps, prices, and strings for only 5 files. Probably I will need to keep track of all the files. I'm thinking of either using FileSeek() or Making my arrays (much) larger.
Maybe it was not a good idea to write code before bedtime.
I finished a draft of the code. I can't test it since the markets are closed but the init() seems to work fine.
Would it be possible to make start() run at fixed intervals instead of at the arrival of a new tick?
https://www.fx1.net/wiki/pmwiki.php/MT4Ticker/MT4Ticker
It is also good to simulate ticks on weekends.
https://www.fx1.net/wiki/pmwiki.php/MT4Ticker/MT4Ticker
It is also good to simulate ticks on weekends.
Thanks. I have a lot of code fixing to do first.