Capture the price entered by the user in a cEdit control

 
I am building a panel and have never done it.
I am starting with Class CControlsDialog. I've done well with buttons and labels.
I've been wanting to capture the price entered by the user in the control in a variable for several days, and I can't. I can't find a suitable example on the net either.
Can you give me a link or explanation about it?
Thank you very much.
 
febrero59 :
I am building a panel and have never done it.
I am starting with Class CControlsDialog. I've done well with buttons and labels.
I've been wanting to capture the price entered by the user in the control in a variable for several days, and I can't. I can't find a suitable example on the net either.
Can you give me a link or explanation about it?
Thank you very much.

The algorithm is as follows: the object catches an EVENT - the end of input (or a change in text). This event must be processed, the text must be converted into a 'double' variable and then saved into your variable.

If you want - there is an example of work in the Trade through the Bank 2 code

Trade through the Bank 2
Trade through the Bank 2
  • www.mql5.com
Серия 'Trade through the Bank'. Набор правил, когда торгуешь через банк (по сути - отдаешь приказ купить через мобильное приложение банка и это приложение совсем не торговый терминал), а торговлю визуализируешь через терминал
 

You have allowed me to solve my problem and continue learning.

Thank you very much Vladimir. 

 

Forum on trading, automated trading systems and testing trading strategies

CEdits are reset after changing any property of the EA

febrero59, 2022.03.18 11:41

Good Morning,
I have created a panel with Controls\Dialog.mqh, which includes CEdits.
It happens to me that when I modify any property of the EA, all the information that I have entered manually in the CEdit is reset.
Is there any way to avoid it?
Thank you very much,
Juan Luis.

 

Probably need to look at the Save and Load methods.

Documentation on MQL5: Standard Library / Basic Class CObject / Save
Documentation on MQL5: Standard Library / Basic Class CObject / Save
  • www.mql5.com
Save(int) - Basic Class CObject - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: