I guess I'm not explaining myself very well... I am drawing a time-based object, i.e. the first point is the start of the day and the second is the start of the next day.
I need to know for any upper TF:
1. How many objects may be drawn in total on the current TF, taking into account that one object per one bar of the upper TF
2. Where the object starts and ends
Yes, I've studied it, but it's too long to use CopyTime() - is there no simpler option?
Renat Akhtyamov: this is the analogue, only in different letters.
I understand, but I don't realise it yet...
Such a question, when connected to a trading server, how much load do you have on your CPU? I have tools 10, no robots or indicators - load up to 35% Phenom II 960T 5 cores 3500Mhz. If the terminal is this voracious, I'll lose the point of messing around with it at all...
Such a question, when connected to a trading server, how much load do you have on your CPU? I have tools 10, no robots or indicators - load up to 35% Phenom II 960T 5 cores 3500Mhz. If the terminal is this voracious, I'll lose the point of fiddling with it at all...
I guess I'm not explaining myself very well... I am drawing a time-based object, i.e. the first point is the start of the day and the second is the start of the next day.
I need to know for any upper TF:
1. How many objects may be drawn in total on the current TF, taking into account that one object per one bar of the upper TF
2. Where the object starts and ends
Yes, I've studied it, but it's too long to use CopyTime() - is there no simpler option?
I need iTime() analogue.
You explain it very badly. I don't understand anything, maybe you can draw me a picture, step by step?
Answer: zero. Since on the top (as I understand it is PERIOD_D1) you have one object: ". the first point is the beginning of the day, and the second is the beginning of the next day".
//+------------------------------------------------------------------+ //| Get Time for specified bar index | //+------------------------------------------------------------------+ datetimeiTime(constint index,string symbol=NULL,ENUM_TIMEFRAMES timeframe=PERIOD_CURRENT) { if(symbol==NULL) symbol=Symbol(); if(timeframe==0) timeframe=Period(); datetimeTime[1]; datetime time=0; int copied=CopyTime(symbol,timeframe,index,1,Time); if(copied>0) time=Time[0]; return(time); }
Example call (if for current symbol and current timeframe)
You explain it very badly. I don't understand anything, can you draw pictures, step by step?
Answer: zero. Since on the top (as I understand it PERIOD_D1) you have one object: ". the first point is the beginning of the day, and the second is the beginning of the next day".
//+------------------------------------------------------------------+ //| Get Time for specified bar index | //+------------------------------------------------------------------+ datetimeiTime(constint index,string symbol=NULL,ENUM_TIMEFRAMES timeframe=PERIOD_CURRENT) { if(symbol==NULL) symbol=Symbol(); if(timeframe==0) timeframe=Period(); datetimeTime[1]; datetime time=0; int copied=CopyTime(symbol,timeframe,index,1,Time); if(copied>0) time=Time[0]; return(time); }
Example call (if for current symbol and weaving timeframe)
datetime time=iTime(0); // врем открытия бара №1
Thanks - I'll try it out - as soon as I get over feeling frustrated.
The picture does not fit the description"the first point is the beginning of the day, and the second is the beginning of the next day".
Judging by the picture, you need to draw two objects on any timeframe (on any timeframe smaller than PERIOD_D1), and the time coordinates of these two objects must be within one day:
The picture does not fit the description"the first point is the beginning of the day, and the second is the beginning of the next day".
Judging by the picture, you need to draw two objects on any timeframe (on any timeframe smaller than PERIOD_D1) - and by time coordinates these two objects must be within ONE day:
Am I reading this correctly?
It doesn't matter how many objects there are - there are more than two. The period is not necessarily limited to D1 - it is limited to a time interval multiple of any upper TF. The objects must be within the time interval - you are right.
Such a question, when connected to a trading server, how much load do you have on your CPU? I have tools 10, no robots or indicators - load up to 35% Phenom II 960T 5 cores 3500Mhz. If the terminal is this voracious, I'll lose the point of messing around with it at all...
Nah, it's not too much of a drain. Just noticeable difference in speed of maths from 4k. I like the fact that there's a sort of automatic loading history.
However, I don't really like it yet.
In essence, it does not give you anything. You still have to synchronize different currency pairs, there are still holes.
I guess I'm not explaining myself very well... I am drawing a time-based object, i.e. the first point is the start of the day and the second is the start of the next day.
I need to know for any upper TF:
1. How many objects may be drawn in total on the current TF, taking into account that one object per one bar of the upper TF
2. Where the object starts and ends
Yes, I've studied it, but it's too long to use CopyTime() - is there no simpler option?
Analogue of iTime() is needed.
this is the analogue, only in different letters.
I understand, but I don't realise it yet...
Such a question, when connected to a trading server, how much load do you have on your CPU? I have tools 10, no robots or indicators - load up to 35% Phenom II 960T 5 cores 3500Mhz. If the terminal is this voracious, I'll lose the point of messing around with it at all...
I understand, but I don't realise it yet...
Such a question, when connected to a trading server, how much load do you have on your CPU? I have tools 10, no robots or indicators - load up to 35% Phenom II 960T 5 cores 3500Mhz. If the terminal is this voracious, I'll lose the point of fiddling with it at all...
g take a look here: https://www.mql5.com/ru/forum/99230
might help
I guess I'm not explaining myself very well... I am drawing a time-based object, i.e. the first point is the start of the day and the second is the start of the next day.
I need to know for any upper TF:
1. How many objects may be drawn in total on the current TF, taking into account that one object per one bar of the upper TF
2. Where the object starts and ends
Yes, I've studied it, but it's too long to use CopyTime() - is there no simpler option?
I need iTime() analogue.
You explain it very badly. I don't understand anything, maybe you can draw me a picture, step by step?
Function for getting the opening time of bars:
//| Get Time for specified bar index |
//+------------------------------------------------------------------+
datetime iTime(const int index,string symbol=NULL,ENUM_TIMEFRAMES timeframe=PERIOD_CURRENT)
{
if(symbol==NULL)
symbol=Symbol();
if(timeframe==0)
timeframe=Period();
datetime Time[1];
datetime time=0;
int copied=CopyTime(symbol,timeframe,index,1,Time);
if(copied>0) time=Time[0];
return(time);
}
Example call (if for current symbol and current timeframe)
g look here: https://www.mql5.com/ru/forum/99230
might help
You explain it very badly. I don't understand anything, can you draw pictures, step by step?
How is it zero?
Here is a screenshot of how it should be:
Function to get the bar open time:
//| Get Time for specified bar index |
//+------------------------------------------------------------------+
datetime iTime(const int index,string symbol=NULL,ENUM_TIMEFRAMES timeframe=PERIOD_CURRENT)
{
if(symbol==NULL)
symbol=Symbol();
if(timeframe==0)
timeframe=Period();
datetime Time[1];
datetime time=0;
int copied=CopyTime(symbol,timeframe,index,1,Time);
if(copied>0) time=Time[0];
return(time);
}
Example call (if for current symbol and weaving timeframe)
What do you mean, zero?
Here's a screenshot of how it should be:
The picture does not fit the description"the first point is the beginning of the day, and the second is the beginning of the next day".
Judging by the picture, you need to draw two objects on any timeframe (on any timeframe smaller than PERIOD_D1), and the time coordinates of these two objects must be within one day:
Am I understanding this correctly?
The picture does not fit the description"the first point is the beginning of the day, and the second is the beginning of the next day".
Judging by the picture, you need to draw two objects on any timeframe (on any timeframe smaller than PERIOD_D1) - and by time coordinates these two objects must be within ONE day:
Am I reading this correctly?
I understand, but I don't realise it yet...
Such a question, when connected to a trading server, how much load do you have on your CPU? I have tools 10, no robots or indicators - load up to 35% Phenom II 960T 5 cores 3500Mhz. If the terminal is this voracious, I'll lose the point of messing around with it at all...
Nah, it's not too much of a drain. Just noticeable difference in speed of maths from 4k. I like the fact that there's a sort of automatic loading history.
However, I don't really like it yet.
In essence, it does not give you anything. You still have to synchronize different currency pairs, there are still holes.