Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1337
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, could you tell me how to pass a structure to a function, so that changes to elements of the structure in the function, are stored in the structure created globally?
Pass the structure by reference. Example:
Pass the structure by reference. Example:
Thank you! Where did this example come from? I was just looking for something about my question in the help and couldn't find it(((
Thank you! Where did this example come from? I was just looking for something about my question in the help and couldn't find it(((
Real implementation + made up function for example.
Real implementation + made-up function for example.
OK, thanks again!
Real implementation + made-up function for example.
Bad example. A structure, as well as any variable declared globally, is accessible in any part of the program.
It will work this way too.
It is different if a structure variable is declared locally.
How to increase/decrease timeframe with mt5?
Forum on trading, automated trading systems and strategy testing
Indicators: Changing Timeframes with Hotkeys
SanAlex, 2020.08.07 11:59
i think it would be the same for mt4 and mt5
Bad example. A structure, as well as any variable declared globally, is accessible in any part of the program.
This will also work.
It's different if the structure variable is declared locally.
Thank you!!!