
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
An example of a script:
and the result:
Edited.
Here they are.
Works on both 4pc and 5pc
In 4-rka apply Period(), Symbol(), etc.
In 5-pc, apply _Period, _Symbol(), etc.
iBars
Returns the number of bars in the history for a specified symbol and period
iBarShift
Returns the offset of the bar to which the specified time belongs
iClose
Returns the closing price of the bar of the corresponding chart
iHigh
Returns the value of the maximal price of the bar in the chart
iHighest
Returns the index of the highest found value of the corresponding chart
iLow
Returns the value of the minimum bar price of the corresponding chart
iLowest
Returns the index of the smallest found value of the corresponding chart
iOpen
Returns the value of the bar open price of the corresponding chart
iTime
Returns the bar open time of the corresponding chart
iVolume
Returns the value of the tick volume of the bar in the chart
And here is theCopyRates variant
and result
Alexey, this is for those who are in a tank. And for the normal ones, CopyRates() is available in mql4 as well. So forget all iOpen and other nonsense. I don't even understand why they put it in mql5.
Oh! Teeny-weeny guys have appeared))
Why do we need in practice to have a lot of consecutive OHLC values - which you suggested to get using CopyRates() ? - except to meditate? ))))
there's not much practical use, here's a trivial task, the unloading (or use) of the Fractals indicator, i have such a code:
show me your code with use of CopyRates()...
And here is theCopyRates variant
and result
But, if we need to constantly track data on new bars, it means to refer to CopyRates on every tick and make a timeseries on every tick?
I'm trying to figure out the best place to put CopyRates.
But, if you need to constantly track data on new bars, then do you need to refer to CopyRates on every tick and make a timeseries on every tick?
I'm trying to understand where better to put the CopyRates.
I've already asked above: WHY? Is it necessary to consider the value of zero bar (the rightmost bar on the chart)?
I have already asked above: WHY? Should the value of the zero bar (the rightmost bar on the chart) be taken into account?
For the table. There are four parameters in the table: Open, Close, High, Low, the last 10 bars, not including the current one.
Last, in the sense of moving backwards from the current one (zero).
Ooh! teeny-weenies have appeared))
why in practice to have a lot of consecutive OHLC values - which you propose to get using CopyRates() ? - except to meditate? ))))
there's not much practical use, here's a trivial task, the unloading (or use) of the Fractals indicator, i have such a code:
show me your code using CopyRates()...
Igor, you should go to the first grade. They teach letters there and after studying you will understand the difference between CopyRates and CopyBuffer.
You better offer me a solution to this problem WITHOUT CopyRates(!)
Forum on trading, automated trading systems and trading strategies testing
How to get Open,Low,High,Close parameters in MQL5?
Retrog Konow, 2019.07.29 19:58
For the table. There are four parameters in the table: Open, Close, High, Low, last 10 bars, not including the current one.
Last, I mean if moving backwards from the current one (zero).
For the table. There are four parameters in the table: Open, Close, High, Low, the last 10 bars, not including the current one.
Last, in the sense of moving backwards from the current one (zero).
In this case CopyRates from the first bar is unambiguously 10. And call it not every tick, but enough when a new bar appears.