Have you removed the line from your start() function?
Thanks Ovo. That was why I had only one line.
Now I can proceed with even more bug squashing.
I'm really confused about this block of code below. I wanted it to either rewrite the last line on the file or add a new line. But, it is always rewriting.
Why are you using a negative offset?
FileSeek(Handle,-1*ByteCount, SEEK_END);
Why are you using a negative offset?
Why are you using a negative offset?
I want to rewrite the last line in the file -- which, its not doing. I tried this strategy in a simpler code that handles only the current chart and it worked.
I'm still attempting to make it update the last line properly.
Sample output:
20130909,15:50,0.9548,0.9550,0.9548,0.9550,3 20130909,15:51,0.9549,0.9549,0.9549,0.9549,1 20130909,15:51,0.9549,0.9549,0.9548,0.9548,2 20130909,15:51,0.9549,0.9549,0.9548,0.9548,2
Btw, I'm thinking of reading a book about debugging techniques (much later). Probably, my code is not very well written and convenient to debug.
Btw, I'm thinking of reading a book about debugging techniques (much later). Probably, my code is not very well written and convenient to debug.
I may save you time -there is no debugging ability for MT4 code. All you can do is to place Print() statement everywhere to monitor values during a program run.
Btw, I'm thinking of reading a book about debugging techniques (much later). Probably, my code is not very well written and convenient to debug.
If you do, pass on the ideas ^_^
Currently I do these 3
1: "test early, test often"
2: stick Alerts everywhere showing the value of important variables.. along with what I think it ought to be.
3: stick this code after every section:
int error = GetLastError(); if(error!=0) Alert(error," after CalcLots");
Are you sure? 5 from the beginning is 5 in. -5 would be before the start, impossible. 5 in from the end is toward the beginning -5 would be beyond the end.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm really confused about this block of code below. I wanted it to either rewrite the last line on the file or add a new line. But, it is always rewriting.
Full code is attached. It writes bar 0 of 6 timeframes per symbol to files. Then, I wanted it to either update the closing prices or write a new line if a new bar comes in. Somehow there is always one line in each file.
It is meant to be run in as an indicator.
Any help would be appreciated.