Hello,
I am new to programming and wanted an answer to my following question.
In mql5 the instructions in the Ontick function are executed at each Tick. is there a way to take the price value (bid or ask) at a given time and store it as a reference value to use it later in the program. for example if I want to have the opening price of the US market (9:30 ET) for a financial asset like SP500 for example
- Ask and bid price in BUY and SELL order
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- While in execution, is it useful for an EA to ask for current tick more than once?
Hello. To store a value you need to put it in a suitable variable. In your case, I think a double will do. Follow this link https://www.mql5.com/en/docs/basis/types/double
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