One Click Trading mode

 

Hello to everyone! 

How I can obtain one click trading mode? (True or False)

 Is there a way?

 

Thanks

 

Dottor Market 

 
Tools -> option -> Trade -> Enable One Click Trading?
 

Hi gooly!

 

thanks for the reply but I mean the fuction mql4.

 

Exemple:

 

if(One_Click_Trading_Mode() == true) {...}

 

I can't find anything returns me true or false :( 

 
DottorMarket:

Hi gooly!

 

thanks for the reply but I mean the fuction mql4.

 

Exemple:

 

if(One_Click_Trading_Mode() == true) {...}

 

I can't find anything returns me true or false :( 

I don't think it's possible with mql4 code.
 
thanks anyway =))
 
DottorMarket:
thanks anyway =))

There is no good way of doing it, but it is possible. You need to have "Allow DLL imports" turned on in order to use Windows file functions. You then check the status by doing the following:

1. Choose a unique file name for the chart, e.g. something created from its ChartID() 

2. Use ChartSaveTemplate() to create a new template from the current chart, using the unique name

3. Use Windows file functions to open and read the .tpl file which has been created in <terminal-data>\Templates

4. Look for the one_click= line in the file. Its value is either 0 or 1 depending on whether the one-click panel is visible

5. Close the template file, and delete it

I guess that you want to adjust the positioning of a label (or other objects) depending on whether the panel is visible. The method above couldn't reasonably be used on every tick, but you could perhaps use it every 2-5 seconds to check whether the positioning needs to be adjusted.

 

Good solution JJC... I try to do!

 I Hope =))

 

Regards 

Reason: