[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 327

 
Tarkovsky >> :

This is not a function, but a button.

I was asking how to position the graph on the object from the script.

Only by intercepting events to find out the button descriptor, there are no standard options to solve this problem in mql4.

 
Roger >> :

Alternatively:

some_time=iTime(Symbol(),PERIOD_D1,1)+1*3600+30*60;

Thank you very much!!!

Yes, I found another version, it seems that it is necessary

string CheckTime = "01:30";

some_time=StrToTime(TimeToStr(CurTime(), TIME_DATE)+""+CheckTime);

 

Can you tell me why the number of ticks coming in, for example, a minute does not always match the Volume[] for that period? I'm counting ticks with my code.

 
Chemist писал(а) >>

Can you tell me why the number of ticks coming in, for example, a minute does not always match the Volume[] for that period? I calculate ticks with my code.

It turns out to be less than the Volume? Sometimes ticks sometimes are very quickly followed by one another and function start does not react to a new tick, if it has not worked out till the end.

 

Yes, less than Volume. On average 1, sometimes more.

For example, a simple check: I include in my code

Print("Volume[0] ",Volume[0]," Vol ",Vol); //Vol is my counter

writes

...

2009.12.03 14:24:55 GMTUSD,M1: Volume[0] 9 Vol 9 etc.

2009.12.03 14:24:52 countticks GBPUSD,M1: Volume[0] 8 Vol 8

2009.12.03 14:24:50 countticks GBPUSD,M1: Volume[0] 7 Vol 7
...

and then all of a sudden

2009.12.03 14:24:59 countticks GBPUSD,M1: Volume[0] 11 Vol 10

it turns out with one tick Volume[0] has changed by two, but with my variable everything is even and correct?

 
Urain писал(а) >>

Only by intercepting events to find out the button descriptor, there are no standard solutions for this task in mql4.

Doesn't anyone do it that way?

Is there any examples of code?

 
Chemist писал(а) >>

Yes, less than Volume. On average 1, sometimes more.

For example, a simple check: I include in my code

Print("Volume[0] ",Volume[0]," Vol ",Vol); //Vol is my counter

writes

...

2009.12.03 14:24:55 GMTUSD,M1: Volume[0] 9 Vol 9 etc.

2009.12.03 14:24:52 countticks GBPUSD,M1: Volume[0] 8 Vol 8

2009.12.03 14:24:50 GMTUSD,M1: Volume[0] 7 Vol 7
...

and then all of a sudden

2009.12.03 14:24:59 countticks GBPUSD,M1: Volume[0] 11 Vol 10

it turns out, with one tick Volume[0] has changed by two, but with my variable, everything is even and correct?

Just while the start function was being processed, another tick came in. Everything is fine.

 
Is there any way to clean it up or is it better to score?
 
Chemist писал(а) >>
Is it possible to batter or is it better to score?

There's no way to score, it's easier to score.

 
Thank you all, now with a light heart I will score.