![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I can only help a little, absolutely free.
There are two functions at the bottom of the indicator. In the comments it displays the value of the indicator itself and the value of the current point on the last trend line.
Figure it out.
Thank you, Alexei. Have a good day.
Good afternoon!
I wrote the following indicator
Please help me to correct the indicator or tell me how.
1) I don't know how to set the reference point "period01", so that the indicator would start with "iOpen" at the beginning of a new period.
2) I don't know how to use "iHighest" so I don't have to use such "crutches".
Please help.
Good afternoon!
I wrote the following indicator
Please help me to correct the indicator or tell me how.
1) I don't know how to set the reference point "period01", so that the indicator would start with "iOpen" at the beginning of a new period.
2) I don't know how to use "iHighest" so I don't have to use such "crutches".
Please help.
Why did you write it?
Why did you write it?
Looking for a pattern...
if moved to the basement it looks like this
Good day!
Greetings, Makar!
What is the opening price for here ? To take the extremums of the first bar immediately. Like this one:
Or have I got the idea wrong?Greetings, Makar!
What is the opening price for here ? To take the extremums of the first bar immediately. Like this one:
Or did I get the idea wrong?I wrote.
1) I do not know how to set the reference point "period01" so that the indicator would start with "iOpen" at the beginning of a new period.
To take right away the extrema of the first bar is correct and I take your code after "else". Thank you.
But here
it does not fit, because it is linked to the beginning of the day and I need the "period01" selection - H1;H4; and so on
Alternatively, you could divide the current date by the number of seconds in the timeframe and then compare the resulting value with the previous value:
The start will probably not be synchronised with the chart, but the timing bars will count correctly. You could think about how to synchronise the first start,
such as:
Alternatively, you could divide the current date by the number of seconds in the timeframe and then compare the resulting value with the previous value:
The start will probably not be synchronised with the chart, but the timing bars will count correctly. You could think about how to synchronise the first start,
such as:
You're welcome. A shorter entry: