Download MetaTrader 5

One Click Trading mode

To add comments, please log in or register
Alfredo Antonetti
1485
Alfredo Antonetti  

Hello to everyone! 

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

 Is there a way?

 

Thanks

 

Dottor Market 

Carl Schreiber
7111
Carl Schreiber  
Tools -> option -> Trade -> Enable One Click Trading?
Alfredo Antonetti
1485
Alfredo Antonetti  

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 :( 

Alain Verleyen
Moderator
32524
Alain Verleyen  
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.
Alfredo Antonetti
1485
Alfredo Antonetti  
thanks anyway =))
JC
1499
JC  
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.

Alfredo Antonetti
1485
Alfredo Antonetti  

Good solution JJC... I try to do!

 I Hope =))

 

Regards 

To add comments, please log in or register