Dear,
I want to store a some data for every trade into my Expert Advisor coding, so EA can use that data to control those trade. As i know several option to save data but all are not good all.
1. Save into Variable.
I can save data into variable but problem is that if expart remove from chart, EA loss that data so it is not working with me.
2. Save into Global variable
but there also have problem. Global variable store with terminal, if terminal move i also loss that save data, also global variable can store data max 4 week, if terminal off for more then 4 week then i also loss data.
3. Save data into trade comments
This is best for me, data will be store with trade, so when every your attach EA on chart you will get save data. It is the best for me, but there also i found a problem. Some broker are edit trade comments when pending order active into trade. If broker change comment, i loss all my save data.
4. More better solution ?
I need help is anyone know more better solution to save data without using comment so EA re attach on chart and get the previous data.
write the data you need in a temp log file. The temp file will stay on the disk forever so you can get that data back anytime you want
Jeff
Dear,
I want to store a some data for every trade into my Expert Advisor coding, so EA can use that data to control those trade. As i know several option to save data but all are not good all.
1. Save into Variable.
I can save data into variable but problem is that if expart remove from chart, EA loss that data so it is not working with me.
2. Save into Global variable
but there also have problem. Global variable store with terminal, if terminal move i also loss that save data, also global variable can store data max 4 week, if terminal off for more then 4 week then i also loss data.
3. Save data into trade comments
This is best for me, data will be store with trade, so when every your attach EA on chart you will get save data. It is the best for me, but there also i found a problem. Some broker are edit trade comments when pending order active into trade. If broker change comment, i loss all my save data.
4. More better solution ?
I need help is anyone know more better solution to save data without using comment so EA re attach on chart and get the previous data.
If there's a lot of trades you would like to store, forget the arrays, a temp file used to be the best approach .... before the implementation of sqlite !
With SQL you can retrieve range of data, based on date interval or by specific item ... that's really the best way to do it nowadays ! I didn't yet implemented it in my metatraders' stuff because I'm not sure it's supported by the tester (that way you'll tell me lol) but I widely use it in my medical projects !
I guarantee you won't reget !
- www.mql5.com
It's to use arrays
then write the arrays in a temp file ! not that hard
Array will be remove when EA remove from chart
s-q-l. did you tried it ? does it work inside the tester ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear,
I want to store a some data for every trade into my Expert Advisor coding, so EA can use that data to control those trade. As i know several option to save data but all are not good all.
1. Save into Variable.
2. Save into Global variable
3. Save data into trade comments
4. More better solution ?