Thank you, only there was no need to create a line (just set parameters), and so everything works.
In the 4-th time in bars through iBarShift was calculated. I used this formula:
datetime time01=time1NEW;datetime time02=time2NEW;
int shift01=iBarShift(0,0,time01);int shift02=iBarShift(0,0,time02);//перевод из скунд в барыint timeCHANGE=shift01-shift02;//разница между 1-й и 2-й точкой линииint timeBAR=(shift02-timeCHANGE);//прибавить разницу ко 2-й точкеint timeBARc=Time[timeBAR];//Перевод из баров в секунды
The fifth doesn't have this function, and I don't know how to use Copy*...
In MQL5 constants of periods have changed (new periods M2, M3, M4, M6, M10, M12, H2, H3, H6, H8, H12 have been added), you can use the following function to convert MQL4 periods:
All that's left to do is to translate the resulting bar into seconds. In 4, it was Time[bar].
In the 5th, I'm doing this by the rule, but I can't get it to work:
If I understand the question correctly.
datetime Time[];
ArraySetAsSeries(Time,true);
CopyTime(Symbol(),PERIOD_CURRENT,0,100,Time);
long timeBARsec = Time[2];//Перевод из баров в секунды, в данном случае Time[бар] бар = 2Comment("timeBARsec = ",StringToTime(Time[2]));
1. Made the hour accuracy for the indicator and the time in the icon description (include the description in the chart properties).
2. Would it be better to put the icons in a buffer? Only how to do this, how to combine time and price in the same buffer?
3. If the line is drawn and there is no icon yet (bar has not appeared), then it gives an error (in the "Experts" tab) and the work with the other icons stops.
2013.09.22 00:10:36 FlatExecution (EURUSD,D1) array out of range in 'FlatExecution.mq5' (124,30)
I.e. array is out of range... The error is in this line:
long timeBARsec=Time[timeBAR];
How can I make my indicator not paralyzed by this error? How do I change the indicator to not paralyze the operation of this error?
Algorithm of trading: Entry by time icon, stop by entry line, exit by entry line icon.
5. Rule of drawing lines: From each fractal to all subsequent ones, from the top to the top and from the bottom to the bottom. Remove lines that are touched by the price and do not draw them.
If the line is executed, it takes a different appearance, a line is drawn to it and it loses the beam. If the line is not executed, it is yellow.
If the line on which the stop will decrease beyond the 2nd point, you can make a stop after the second point. As a matter of fact the stop can be moved along this line as well, if it is calculated differently.
Drawing remains the same, according to fractals.
Algorithm. The sign does not always mean unambiguous buying or selling. However I think that news influences it somehow. In fact, testing was not carried out because there is no automatic drawing by fractals and corrections of this drawing (removal of the affected lines).
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
And how do I remove the icons if the line is no longer there?
You need the time calculation in bars
Do it in bars.
you know the time, i.e. Time[9] was 9 bars.
I only wrote the beginning,
Then do what you want.
Time calculation is needed in bars
do it in bars.
You have the time known, i.e. Time[9] was 9 bars.
I only wrote the beginning,
Then do what you want.
Thank you, only there was no need to create a line (just set parameters), and so everything works.
In the 4-th time in bars through iBarShift was calculated. I used this formula:
The fifth doesn't have this function, and I don't know how to use Copy*...
Thanks, but there was no need to create a line (just set parameters), but it works.
In the 4th, the time in bars was counted through iBarShift. This is the formula:
The fifth doesn't have this function, and I don't know how to use Copy* function yet...
iBarShift analog in 5
I've done the drawing by seconds, there are gaps in the weekend, which means you still need to count by bars.
Thank you very much. Barshift counts.
All that's left to do is to translate the resulting bar into seconds. In 4, it was Time[bar].
In 5, I'm doing it like this according to the rule, but it's not working:
Thank you very much. Barshift counts.
All that's left to do is to translate the resulting bar into seconds. In 4, it was Time[bar].
In the 5th, I'm doing this by the rule, but I can't get it to work:
If I understand the question correctly.
if I understood the question correctly
Yes, it's working) Thank you very much)
If there is no "end" it is zero and cannot be seen.
1. Made the hour accuracy for the indicator and the time in the icon description (include the description in the chart properties).
2. Would it be better to put the icons in a buffer? Only how to do this, how to combine time and price in the same buffer?
3. If the line is drawn and there is no icon yet (bar has not appeared), then it gives an error (in the "Experts" tab) and the work with the other icons stops.
2013.09.22 00:10:36 FlatExecution (EURUSD,D1) array out of range in 'FlatExecution.mq5' (124,30)
I.e. array is out of range... The error is in this line:
long timeBARsec=Time[timeBAR];How can I make my indicator not paralyzed by this error? How do I change the indicator to not paralyze the operation of this error?
Algorithm of trading: Entry by time icon, stop by entry line, exit by entry line icon.
5. Rule of drawing lines: From each fractal to all subsequent ones, from the top to the top and from the bottom to the bottom. Remove lines that are touched by the price and do not draw them.
The problem with the error has been resolved.
The icon is now drawn on the signal bar opening.
If the line is executed, it takes a different appearance, a line is drawn to it and it loses the beam. If the line is not executed, it is yellow.
If the line on which the stop will decrease beyond the 2nd point, you can make a stop after the second point. As a matter of fact the stop can be moved along this line as well, if it is calculated differently.
Drawing remains the same, according to fractals.
Algorithm. The sign does not always mean unambiguous buying or selling. However I think that news influences it somehow. In fact, testing was not carried out because there is no automatic drawing by fractals and corrections of this drawing (removal of the affected lines).