Topic: Change trading time with set parameters

Hi,
the ea Studio give the opportunity to Set trading time. Is it possible to change this trading time in the setting of compiled ea. I mean with Input fields before Start..

Re: Change trading time with set parameters

Yes, you can do it.

Open the expert and you will see the settings there.

// Session time is set in seconds from 00:00
int sessionSundayOpen           = 0;     // 00:00
int sessionSundayClose          = 86400; // 24:00
int sessionMondayThursdayOpen   = 0;     // 00:00
int sessionMondayThursdayClose  = 86400; // 24:00
int sessionFridayOpen           = 0;     // 00:00
int sessionFridayClose          = 86400; // 24:00
bool sessionIgnoreSunday        = false;
bool sessionCloseAtSessionClose = false;
bool sessionCloseAtFridayClose  = false;

You have to set the times in seconds.

Re: Change trading time with set parameters

Yes but what i have to Do to change it Not in mql code.. I want change it in expert Option.. Did i only nee to put an Input before the variables?

E.g. Input int sessionSundayOpen

Re: Change trading time with set parameters

Yes, you have to add "input" in front of each line. You have to also add parameters names in comments at the end of each line.

Like that:

input int sessionSundayOpen           = 0;     // Sunday Open
input int sessionSundayClose          = 86400; // Sunday Close
input int sessionMondayThursdayOpen   = 0;     // Monday - Thursday Open
input int sessionMondayThursdayClose  = 86400; // Monday - Thursday Close
input int sessionFridayOpen           = 0;     // Friday Open
input int sessionFridayClose          = 86400; // Friday Close
input bool sessionIgnoreSunday        = false; // Ignore Sunday
input bool sessionCloseAtSessionClose = false; // Close at session Close
input bool sessionCloseAtFridayClose  = false; // Close at friday Clsoe

https://s9.postimg.org/wx93wtcdr/screenshot_177.png