Is there a simple way to get the price from x seconds ago? Or do I need to build an array of these prices?
I'm working on an EA, and I want to compare the current market price to the price from 30 or 90 seconds ago. Is there a way to get this info from MarketInfo? Or does my EA need to record prices and timestamp them?
- MQL5 Wizard: Development of trading robots for MetaTrader 5
- Instant notifications and alerts in MetaTrader 5
- How to become a signal provider and receive monthly fees
imtav:
I'm working on an EA, and I want to compare the current market price to the price from 30 or 90 seconds ago. Is there a way to get this info from MarketInfo? Or does my EA need to record prices and timestamp them?
You need to record the prices and time or use a timer.
I'm working on an EA, and I want to compare the current market price to the price from 30 or 90 seconds ago. Is there a way to get this info from MarketInfo? Or does my EA need to record prices and timestamp them?

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