how to change profile

 

hello all respected mql programmers

i have three profiles in my terminal with three different forex systems..i want to change profile on specific time for example i have profile following name abc,def,ghi  . now  i want automaticaly change profile  after every 2 mins .please guide me how i acheive this.waiting your kind response

 
zahidmahmood:

hello all respected mql programmers

i have three profiles in my terminal with three different forex systems..i want to change profile on specific time for example i have profile following name abc,def,ghi  . now  i want automaticaly change profile  after every 2 mins .please guide me how i acheive this.waiting your kind response

You need to use WinApi DLL call to do that, not possible with mql4 only.

Check mql4.com forum.

 
zahidmahmood:

hello all respected mql programmers

i have three profiles in my terminal with three different forex systems..i want to change profile on specific time for example i have profile following name abc,def,ghi  . now  i want automaticaly change profile  after every 2 mins .please guide me how i acheive this.waiting your kind response

Save your profile#1 to template "abc.tpl",  profile#2 to template "def.tpl",  profile#n to template "xyz.tpl".

Then, write an EA or script, using Timer event and ChartOpen/ChartApplyTemplate/ChartClose to apply each profile every 2 mins. 

BTW, in curent MT4 terminal (Build 926), the Timer event is unstable, it often stop response. For MT5, it is fine.

 
Xiangdong Guo:

Save your profile#1 to template "abc.tpl",  profile#2 to template "def.tpl",  profile#n to template "xyz.tpl".

Then, write an EA or script, using Timer event and ChartOpen/ChartApplyTemplate/ChartClose to apply each profile every 2 mins. 

BTW, in curent MT4 terminal (Build 926), the Timer event is unstable, it often stop response. For MT5, it is fine.

A template is not a profile.
 
actuly my profile base on four time frames chart m5,m15,h1,h4 if i save profile to template then i think just one chart open
 

Oh men, extend your thinking please......

You can save each chart of profile into several templates, and using EA to load them one by one!

 
instead of EA any idea for change?
 
Khurram Mustafa:
instead of EA any idea for change?

You can use Timer event in EA or script.

Of course, instead of Timer event, you can check PERIOD_M1 time stamp in indicator's OnCalculate handler.