I agree, but not necessarily on all instruments, just one, because the time is the same everywhere.
The easiest way to determine a new bar: (I made it myself, very simple and effective)
and put the construct in OnTick where you actually need this new bar
Not quite like this. The new bar starts not at 00 sec, but with the arrival of the first tick after 00 sec. If the timeframe does not contain a single tick after 00 sec, we won't have a corresponding bar
Give me a harsh argument, I checked on my EA - both on 2 pairs (multic) and
on one the test result since 2000 on all ticks is no different as well as on 1 pair,
and the Expert Advisors with different strategies!
And if the calculation is done not on the text bar but on the history of 2 or more bars (even if it is a million)
We need to search for the bar on history!
So it's not checked well, or the EA is NOT multi-currency, and it just can work with different symbols. The reasoning is simple - we know that ticks come for different symbols at different times. Accordingly, if an EA is onTick EURUSD (for example), and it checks GBPUSD or even just tick changes of GBPUSD instead of EURUSD, the result will be different. In particular, a bar formed on EURUSD may occur before the formation of a bar with the same time on GBPUSD. If you trade GBPUSD twice on the same bar: the previous GBPUSD bar will still be considered as a new bar (zero). As for the multi-currency indicators, everything is clear. Learn the basics.
В последнее время возрос интерес к кластерному анализу рынка FOREX. MQL5 открывает новые возможности исследования закономерностей движения валютных пар. Важным преимуществом MQL5, по сравнению с MQL4, является возможность использования неограниченного количества индикаторных буферов. В данной статье описан пример построения мультивалютного индикатора.
I mean, I've always copied from timeseries to dynamic array, no size was set (never had an error), and now this. How do you understand all this?
As much was available, so much we got. That's how to understand it. Check the available history depth. Before requesting the data, make sure it is available. What build do you have? recently corrected a bug with copying monthly timeframes, this might be it.
I agree, but not necessarily on all instruments, just one, as time is everywhere
the same ...min 00 sec, and the easiest way to detect a new bar: (I've made it myself, it's very simple and effective)
It is obligatory, exactly on all.
One exception - if the EA analyzes only the formed bars, you can just wait for the time of a new bar (:00) and for different instruments analyze the 0th or the 1st bar, depending on whether there is a bar with a new time (if there is - we analyze the old bar with the index 1, and if there is no index - the formed bar will have the index 0, until the new bar appears).
What do the numbers mean?
And how to get rid of this error ????
By design temp should be equal to -1.0
ZS I have a check for equality to zero, but don't know how to check for equality to this -1.#IND
I agree, but not necessarily on all instruments, just one, because the time is the same everywhere.
The easiest way to determine a new bar: (I made it myself, very simple and effective)
and put the construct in OnTick where you actually need this new barGood afternoon faced with the following:
Alert("Request = ", Bars("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00")) );
datetime timeArray[]; //dynamic array, the size is not set
int ckopirovano = CopyTime("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00"),timeArray);
Alert("Copied = ", ckopirovano);
Resultant :
Query = 4
Copy = 3
Alert("Request = ", Bars("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00")) );
datetime timeArray[5]; // specify size
int ckopirovano = CopyTime("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00"),timeArray);
Alert("Copied = ", ckopirovano);
Resultat :
Query = 4
Copied = 4
I mean, I've always copied from timeseries to dynamic array, no size was set (never had an error), and now this. How should I understand it?
Give me a harsh argument, I checked on my EA - both on 2 pairs (multic) and
on one the test result since 2000 on all ticks is no different as well as on 1 pair,
and the Expert Advisors with different strategies!
And if the calculation is done not on the text bar but on the history of 2 or more bars (even if it is a million)
We need to search for the bar on history!
Good afternoon faced with the following:
Alert("Request = ", Bars("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00")) );
datetime timeArray[]; //dynamic array, the size is not set
int ckopirovano = CopyTime("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00"),timeArray);
Alert("Copied = ", ckopirovano);
Resultant :
Query = 4
Copy = 3
Alert("Request = ", Bars("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00")) );
datetime timeArray[5]; // specify size
int ckopirovano = CopyTime("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00"),timeArray);
Alert("Copied = ", ckopirovano);
Resultat :
Query = 4
Copied = 4
I mean, I've always copied from timeseries to dynamic array, no size was set (never had an error), and now this. How should I understand it?
I mean, I've always copied from timeseries to dynamic array, no size was set (never had an error), and now this. How do you understand all this?
Bild 489, I don't think it's about accessibility (because the second option works adequately).
So there's something wrong with it:
Alert("Request = ", Bars("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00")) );
datetime timeArray[2];
int ckopirovano = CopyTime("GBPUSD", PERIOD_MN1, datetime("2009.01.01 00:00:00"), datetime("2008.10.01 00:00:00"),timeArray);
Alert("Copied = ", ckopirovano);
Resultat :
Query = 4
Copy = 1 (should there be two?)
Im_hungry:
I agree, but not necessarily on all instruments, just one, as time is everywhere
the same ...min 00 sec, and the easiest way to detect a new bar: (I've made it myself, it's very simple and effective)
It is obligatory, exactly on all.
One exception - if the EA analyzes only the formed bars, you can just wait for the time of a new bar (:00) and for different instruments analyze the 0th or the 1st bar, depending on whether there is a bar with a new time (if there is - we analyze the old bar with the index 1, and if there is no index - the formed bar will have the index 0, until the new bar appears).
Is it a good idea to create a graphical object with a name that is already occupied (to move the whole object with one function)?
If you move one coordinate at a time with ObjecMove, one coordinate may move and another may not.
Please tell me, how correct is it to create a graphical object with a name already occupied (to move the whole object with one function)?