I changed:
FileSeek(TradeInfoHandle,-TicketNumberLength,SEEK_CUR);
to:
FileSeek(TradeInfoHandle,-(TicketNumberLength+1),SEEK_CUR);
Not perfect, but better results than I got before.
if anyone has any ideas how to do this better I am still interested and thank you in advance for sharing your insight.
Kindest regards,
Don
disbellj: try and over write one line in a CSV
- Can't be done when lines are variable width (IntegerToString is variable)
- Can't be done easily when lines are fixed (your seek attempt)
- Just read the entire file in to an array of strings, modify the one line, write the array back out. Adding lines - add another element. deleting lines don't write a line out.
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
So that can I save the important info to me from each trade, I made code to search for the ticket number (first column) while inside a for loop looking at all open orders. The purpose of this code is to try and over write one line in a CSV file with new information for that line/ticket. Once the ticket is closed, the line is no longer updated and contains the last info written. The problem is, it doesn't work. It adds lines instead of replacing lines. Does anyone know what I'm doing wrong or how to fix it? Thanks much in advance!
Kindest regards,
Don