Not to get the cart too far ahead of the horse, I wonder if anyone might happen to know of any place where one could search for any realtime data support for MetaTrader MQL?
I’ve begun reading the documentation in the MQL4 book - would link to it here, for convenience but this is my forum post nr. 3 so I can’t add URLs into forum posts yet. To my best estimate, the MQL4 book describes basically everything there is to know about MQL4, as it being a programming language - moreover, a programming language very much like the C programming language, such that has found a lot of popularity in UNIX systems development and in software development overall. So, there’s hopefully a lot of opportunity for crossover between C applications and MQL applications, for any specific usage scenarios.
Reading the documentation, I’ve learned that MQL has functions for operations about charts, windows, OHLC data tuples, and file I/O. Of course, the Charts and OHLC data tuples in MetaTrader are available at discrete data sampling rates - e.g. one tick every 1 minute, 60 minutes, etc. The shortest data sampling rate in the charts is 1 minute.
I’ve been studying MetaTrader with a demo account, of course. I’ve noticed that the conventional MetaTrader “New Order” window illustrates a realtime data feed about the respective buy/sell market rates in any single currency pair.
I don’t imagine MQL4 itself would offer access for MQL Programs - i.e MQL Scripts, Expert Advisers, an Indicator calculations - that it would or (so I estimate) probably would not offer access to the same realtime data illustrated in the “New Order” window. I wonder if there might be any sort of a third-party add-on that might offer such a fine-grained depth of data access, though, for analysis of the market data?
The following are just some of my observations so far:
I’ve noticed that there are - so I believe - some occasional trends illustrated in the realtime data, such in analyzing how the market trends progress within the margin of a {StopLoss, EntryRate, TakeProfit} tuple of any single paper trading bid, and how that seems to relate to the profit from the individual bid. One thing I’ve noticed, this morning, is that if there is a reversal in the market trend - that is, if the market trend exits the margin on the same side of the margin as at which the market trend had entered the margin, when the bid’s entry price was reached, then it is probably not going to be to a profit, for the individual bid.
There are a lot of oscillations in the market data, apparent in the realtime data view. I don’t imagine I’m able to estimate what could be the causes of those very fine-grained market data oscillations. I’m sure it has something to do with any number of software services, somewhere, but - in any ways beyond that simple estimate - I think it would be like trying to reverse-engineer a black box, LoL, to try to guess out what’s causing the fine-grained market rate oscillations. Inasmuch as that those fine-grained market rate oscillations may illustrate - ever - a sort of “Bounded” quality, if not a “Walking bound”, I believe it could be ideal if one could be able to analyze the limits of each such bound, and ideally to set the stop-loss and take-profit margins of any bid such that those limits will occur within the same bounds - as to ensure, to the greatest algebraic accuracy hypothetically possible that for each bid, the bid could be be calculated as that the market rate would not perform a reversal within the bid.
Maybe that’s a little too narrow-going for a software idea? Hypothetically, if the bounds of such a bounded oscillation would not be too narrow to place a bid within, then - if the realtime data would be available for calculation in Indicators - it could be to a sort on ideal, though very fine-grained automated trading system, possibly?
So, that’s why I wonder if there’s any possibility of accessing the data in real time, from any applications in MetaTrader’s MQL?
Of course, to produce any sort of a mechanical trading system as would hypothetically operate on the same realtime data, it might be well if the hypothetical application would be produced on - ideally - a very well performing program implementation, on a suitably fast computer. Candidly, so, I don’t know if any of these ideas may seem very realistic in any manner of a longview. I simply thought I’d like to inquire about the realtime data, so - and there is my best effort at synopsis as to “Why?”
I think it’s a really computationally interesting platform, MetaTrader. I believe I’ll resume staring at the realtime data feed, shortly.
Sure, though, even at a sampling rate of 5M there are some periodic trends visible in the market rate data, this early in the week at last - the USCDAD(i) exchange - image produced with MetaTrader 4
The magenta vertical line denotes the start of the week, in the chart as illustrated.
Though it differ slightly across each time period delineated in the chart, it seems to describe a periodic function of some kind? Roughly, it’s like there are three or four major, distinct curving-slope trends, as {A, B, C} or {A, B, C, D} in each period between the respective “Yellow Lines”, - those, as I’ve added to the chart in order to annotate, albeit in a simple illustration, the estimable period off time in the matter recurring as a sort of periodic function? Notably, at start-of-week, the “A” curve is pretty low, albeit - and there’s a short lead-up time before the matter commences at the start of the week?
It seems that there’s a certain similarity across the overall shape of each respective curve in the trend? If not a ratio between the maximum magnitude of each respective “Crest”? I’m not sure if this could seem occur in any other markets, though.
Updated: In a metaphor onto analog radio systems, if there are software services establishing a sort of carrier wave in the market, then perhaps one could say that any number of market interactions may be providing a modulating signal such that the market rate fluctuates in something of a mathematical combination of the Carrier wave and the Modulating Input? Maybe this could seem a like bit of an abstract metaphor, but I think it makes sense - perhaps towards a bit of a cross-domain study about market rate analysis, but in a manner like a radio systems analysis? Assuming that the week’s early market data might illustrate a general shape of the carrier wave, as such - but I haven’t looked at previous weeks, yet, to see if any other weeks start of as so, in that specific currency pair.
The “Small-scale reversals” in this first day of USDCADi trading - prototypically - these reverals seem to look approximately like so, in and albeit rudimentary representation of realtime market data within a minute’s interval … resolving a momentary technical difficulty, I’ll add the graphic in a reply.