• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 8:26pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 8:26pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Saving user defined Functions within a mql file? 6 replies

How to get 2-dimension array to file and than get back it [MQL4] 14 replies

Programmatic saving/loading of .set file? 16 replies

Two Dimensional Array vs One Dimensional Array 13 replies

Calculate Stochastic Formula on a array (non indicator buffer array) 2 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
Tags: Saving array data to file ?
Cancel

Saving array data to file ?

  • Post #1
  • Quote
  • First Post: Aug 26, 2011 4:01am Aug 26, 2011 4:01am
  •  futurespec
  • Joined May 2011 | Status: If you think I'm mad, I must be mad | 1,058 Posts
I am trying to save array data to the end of a file but the file size does not appear to be increasing.

Is it possible to append array data to the file????

I am using .........

mArrdat = FileOpen(mArrFile, FILE_BIN|FILE_WRITE, ';');
if(mArrdat > 0)
{
int p = FileSeek(mArrdat, 0, SEEK_END);

FileWriteArray(mArrdat, mCurrVals, 1, 9);
FileClose(mArrdat);
}

All help appreciated.
TIA
If you think I'm mad, I must be mad
  • Post #2
  • Quote
  • Aug 26, 2011 4:16am Aug 26, 2011 4:16am
  •  One day!
  • Joined Jul 2009 | Status: ...or there about! | 220 Posts
The description for the function mentions this...

....If there is a need to add data to an existing file, it must be opened using combination of FILE_READ | FILE_WRITE.

Perhaps this is the problem?
 
 
  • Post #3
  • Quote
  • Aug 26, 2011 4:22am Aug 26, 2011 4:22am
  •  futurespec
  • Joined May 2011 | Status: If you think I'm mad, I must be mad | 1,058 Posts
Thanks so much.
Been staring at it so long that I missed that ;-(

I am sure that is the answer
If you think I'm mad, I must be mad
 
 
  • Post #4
  • Quote
  • Aug 26, 2011 4:34am Aug 26, 2011 4:34am
  •  nubcake
  • Joined Oct 2009 | Status: >Apocalypto< for Deputy PM | 2,918 Posts
it is exactly the problem. it's just another example of mql being as retarded as fuck.

if they had their shit together they would have the following bit flags

1 = read
2 = write
3 = append

but in their epic laziness they didn't bother defining the append type, and instead you have to bitwise or the read and write values... or just hard pass a value of 3 which is exactly the same thing.

similarly with the bin and csv type bit flags. they are misleading, and mql is just pure ass and more difficult and unintuitive to use than a real programming language.
 
 
  • Post #5
  • Quote
  • Last Post: Aug 26, 2011 4:44am Aug 26, 2011 4:44am
  •  futurespec
  • Joined May 2011 | Status: If you think I'm mad, I must be mad | 1,058 Posts
Hi Nubs :-))

Take it that you really like mq4 then!
My sentiments exactly but I do think that you was being a little too lenient ;-)

And there was me thinking that it was me being a little too dense (again).
If you think I'm mad, I must be mad
 
 
  • Platform Tech
  • /
  • Saving array data to file ?
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023