Questions from a "dummy" - page 249

 
kPVT:

You can do that.

And you have a lot of seconds in an hour, as much as 72,000! I wish I had that many in reality )).

In the real code you still need to check the synchronisation of the smaller timeframe.

Thank you, the problem is not with the code. The problem is with Bars.

At first call it almost always returns 0, then periodically. Synchronization solves the problem only partially.

The main problem is that if Bars returns 0, it does not necessarily return the number of bars in a given period.

It seems that the number of bars is related to the beginning of the story, I'm still trying to figure out how to double-check this.

PS yes, the seconds were wrong :)

 
Silent:

Thank you, it's not the code. The problem is with Bars.

On first call it almost always returns 0, then periodically. Synchronization solves the problem only partially.

Because the main problem is that if Bars does not return 0, it doesn't necessarily return the number of bars in a given period.

It seems that the number of bars is related to the beginning of history, I'm still trying to figure out how to double-check it.

PS yes, I was wrong about seconds :)

I cannot say anything about Bars - I do not use them.

I use Copy* function, which gives both number of elements and necessary data of these elements.

 
kPVT:

I can't say anything about Bars - I don't use them.

I use Copy* function, which gives both number of elements and necessary data of these elements.

It looks like we'll have to do it that way.

Ok, thanks. I will try to talk to the SD later, maybe they will check it themselves.
 
Silent:

I need to get the number of bars of the minutes from the high timeframe.

I get an incomprehensible number from Bars. On H1 I get 1201. On M1 I get 6.

Please, tell me where the problem is.

What does this line mean:

bm=Bars(_Symbol,PERIOD_M1,tm[0]+b,tm[0]);

?

And before I saw the line

int b=72000;   // секунд в H1
I thought there were 3,600 seconds in an hour. Now I have my doubts.
 
Contender:

what this line means:

?

And before I saw the line.

I thought there were 3,600 seconds in an hour. Now I'm having doubts.

In a rush. It started with 86400 for days.

Not the point.

 
Silent:

On a whim. It started with 86400 for the days.

Not the point.

1. You did not answer the first question.

2. Accuracy is important in programming.

 
Contender:

1. You have not answered the first question.

Ask for the number of bars on a given interval
Документация по MQL5: Доступ к таймсериям и индикаторам / Bars
Документация по MQL5: Доступ к таймсериям и индикаторам / Bars
  • www.mql5.com
Доступ к таймсериям и индикаторам / Bars - Документация по MQL5
 
Silent:
Request the number of bars in the given interval

the interval you specify is: current time (current bar time) - current time (current bar time) plus some number of seconds (i.e. some future time)

What do you want to get in the given interval? How will the price develop? "If you knew the price, you would live in Sochi"

 
Silent:
Query the number of bars on a given interval
Check (log) the start (t[0]+b) and end (t[0]) times of the range. You will get it right away.
 
Silent:

It looks like we'll have to do just that.

OK, thank you. I'll see if I can get in touch with the SD later and see if they can check for themselves.
You don't need to contact servicedesk with this question. What answer do you want to get?