Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 320
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
Remember the time of the current bar and watch when the twentieth bar opens.
In other words, we should not rely on the serial numbers of bars, but calculate the serial numbers of bars on the basis of their opening times.
If the five-minute bar opened at 00-00, then the twentieth bar after it will open at 1-40
But we face a problem: if bar 1-00 is not on the chart, bar 20 will actually be bar 19.
And I need it to be exact.
In other words, we should not rely on serial numbers of bars, but calculate serial numbers of bars on the basis of their opening times.
If the five-minute bar opened at 00-00, then the twentieth bar after it will open at 1-40
But we face a problem: if bar 1-00 is not on the chart, bar 20 will actually be bar 19.
And I need it to be exact.
The +20 bar does not exist yet, it's in the future. So I will have to do something else.
And that the 1:00 bar is not on the chart during market hours and that the market opened at 00:00 - how is that? Have there been any precedents?
I don't have the +20 bar yet, it's in the future. So I'll have to do something else.
Thank you very much for the valuable information.
I would be very grateful if you could advise me on my cranking options.
I only use 1-00 bar as an example and I have seen that some bars may be absent, especially on 5 min.
Thank you.
Well, if you don't like the bar counter, you can set an order time of +/- 1 minute. The zero bar time is the starting point. In general, there are two coordinates in the trading terminal - time and price.
Thank you, Owner! Why did you put the text in the SRC?! You're stretching my text so you can't catch "reply"! That's why I'm replying here. I got stuck that MarketInfo() doesn't work in the tester, that's why I got stuck. Of course, if I set spread in tester, I can get it from Aska-Bid difference, which I'll correct in my own code now! Tried it, it doesn't work! We only know the Bid, but how do we know the spread and Ask? Like the chicken and egg case before?
I need to open an order 20 bars from the current value of the Bars variable
How do I code this?
Thank you.Thank you very much for the valuable information.
I would be very grateful if you could advise me on my unscrewing options.
Screwdriver, spanner, corkscrew, knife, fork...
What are we unscrewing?
By time, by bar offset, by moon, by planets in the solar system, but not by If 10 == 15, then open.
You're shitting me.