MartinT: FileWriteStruct doesn't work with arrays that "contain strings, dynamic arrays or virtual functions.". To make it compile you need to remove string symbol; from trade struct.
| Exactly. next time RTFM FileWriteStruct - MQL4 Documentation struct_object [in] Reference to the object of this structure. The structure should not contain strings, dynamic arrays or virtual functions. |
Can I convert the string to bytes or another data type so that I don't lose the information?
WHRoeder, there's no reason to be rude. It was an honest oversight. I modeled my code on the documentation... I obviously read the manual. Snotty remarks like yours are the reason people don't ask questions when they need help.
Can I convert the string to bytes or another data type so that I don't lose the information?
WHRoeder, there's no reason to be rude. It was an honest oversight. I modeled my code on the documentation... I obviously read the manual. Snotty remarks like yours are the reason people don't ask questions when they need help.
hello,
regarding RTFM i may say that i find it to be in the funny side - at least for me ; some years before (ahem) whenever i was facing that epxression, I got the impression that it was used in a friendly manner , coming from a positive stance and also humorous :) I could use it in a similar manner on my own - a rather geeky approach if you ask me but quite common to computer users , but again, not in a bad attitude ( i guess :) )
hello,
regarding RTFM i may say that i find it to be in the funny side - at least for me ; some years before (ahem) whenever i was facing that epxression, I got the impression that it was used in a friendly manner , coming from a positive stance and also humorous :) I could use it in a similar manner on my own - a rather geeky approach if you ask me but quite common to computer users , but again, not in a bad attitude ( i guess :) )
Well, you may use it both ways, I think. A good advice and expressing contempt.
Anyway, I still have a bug report pending at Service Desk since 2014.08.28 - the third parameter always gets trimmed to the sizeof of declared structure. I.e. it invalidates structure inheritance, and actually the parameter becomes very useless.
Use char[12] instead, 12 is max length of a symbol.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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 trying to write a script which writes my trading history to a binary file. I tried to follow the example at https://docs.mql4.com/files/filewritestruct, but I keep getting the compile error "'tradeBuff' - parameter conversion not allowed OSR Trade History Recorder Binary.mq4 72 33"
I can't figure out what the compiler is unhappy. Do you know why this won't compile?