how to save/load ea settings programmatically

 

hi,

is there a method or way provided by MQL on saving the EA input (extern) values to file, for later restoration?

manually, i press the 'save' and 'load' button. how about programmatically? are we able to do this without doing it the hard way - which is FileWrite()/FileRead the concerned EA extern values?

 
jcadong5 wrote >>

hi,

is there a method or way provided by MQL on saving the EA input (extern) values to file, for later restoration?

manually, i press the 'save' and 'load' button. how about programmatically? are we able to do this without doing it the hard way - which is FileWrite()/FileRead the concerned EA extern values?

Yes, Of course. As you enter to the box of all your Input data, then you can press on "SAVE" icon, and then you can even decide the name f the *.SET file.

 
crossy wrote >>

Yes, Of course. As you enter to the box of all your Input data, then you can press on "SAVE" icon, and then you can even decide the name f the *.SET file.

Yes, I do that manually. I am trying to figure out if I can code my EA to do it himself, without the lengthy FileRead/Write of extern fields into a file.

(This is for recovery in case of unexpected things like unexpected computer restart, or bad EA program resulting to hang or needing to kill the EA's run, and need to restore old inputs for next run [specifying ~'restore'].)

 
jcadong5 wrote >>

Yes, I do that manually. I am trying to figure out if I can code my EA to do it himself, without the lengthy FileRead/Write of extern fields into a file.

(This is for recovery in case of unexpected things like unexpected computer restart, or bad EA program resulting to hang or needing to kill the EA's run, and need to restore old inputs for next run [specifying ~'restore'].)

Look my freind, as an old trader, if you have a succesful EA then this is the time to deal this small problem, but if not then....

Do I correct?

 

The "long winded" functions you mention are actually the correct way of doing this.

Appraise yourself of the following:

FileOpen()

FileReadString()

FileWrite()

FileClose()


CB