How do I get Open[0], High[0], Low[0], Close[0], not only for the symbol attached bot for all symbols?
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,
I'm working on a code that loops through all the symbols available and do some data processing. Here, as example, I’m writing to file the current prices of the new incoming Tick:
I run the code as an EA attaching it to whatever symbol (not important which one, because I'm not use that symbol actually, but I loop through all symbols), and I choose the Bar length to M1 or H1.
Actually, instead of ASK and BID, I would need to know and log the Open[0], Close[0], High[0] and Low[0] of the last closed bar.
During execution of course I could use the predefined functions Open, Close etc to know the prices of the last bar for the symbol the EA is attached to, but it is not what I need.
Since I need to know that values for all the symbols I’m looping into, not properly the one I’m attached to.
I thought to use MarkedInfo, which provides MODE_ASK, MODE_BID and even MODE_HIGH and MODE_LOW… but that refers to High and Low of the day not of the last Bar, and also does not provide Open and Close.
Any idea?
Thanks