Questions from Beginners MQL5 MT5 MetaTrader 5 - page 605
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
Hello Vladimir.
I must have phrased my question incorrectly.
I don't need a subwindow, the indicator should be placed on the price chart as a standard chart
I regard it as an example, and try to understand .
I want the indicator mounted on the chart to have its number, so that the necessary number of copies can be created on the chart using the "Add" button ..... I want to delete one selected by the "cross" button ........ (I don't want to describe them yet))
When an indicator should be added to the main chart window
sub_window
[in] Chart subwindow number.0 means main chart window. To add an indicator to a new window, the parameter must be one more than the index of the last existing window, i.e. equal toCHART_WINDOWS_TOTAL. If the parameter value exceedsCHART_WINDOWS_TOTAL, a new window will not be created, the indicator will not be added.
You cannot add the indicator to OnInit() - since the expert has not yet been formed at this stage. But the function - OnTick() is a sign of complete working of the Expert Advisor.
And rewrite the AddIndicator() function so that it returns false at unsuccessful attempt to add an indicator.Hello Vladimir.
I must have phrased my question incorrectly.
I don't need a subwindow, the indicator should be placed on the price chart as a standard chart
I regard it as an example, and try to understand .
I want the indicator mounted on the chart to have its own number, so that the necessary number of copies can be created on the chart using the "Add" button ..... I want to delete one selected with the "cross" button ........ (there are a lot of fantasies and I don't want to describe them yet))
bool TimeStart=false;
int hour=12;
//--Фильтр по ремени открытия бара внутри дня
if (TimeStart==true)
{
datetime Open_timePos=iTime(_Symbol,0,0);
MqlDateTime str1;
TimeToStruct(Open_timePos,str1);
str1.hour=hour;
str1.min=0;
str1.sec=0;
datetime start_time=StructToTime(str1);
if (start_time>iTime(_Symbol,0,0))
{
BuyPrIMA=false;
SellPrIMA=false;
}
Can you tell me how to filter by day number and separately by week number in a month? Inside the day I have done this:
He's asking about the week of the month
I've made all three options there. Which one does he want to use as a base, please?
This one?
I did all three options there. Please specify.
There are five to six weeks in the month, today is the fourth week of the month
str.day day of the month
str.day_of_week day
There are four five weeks in a month, today is the fourth week of the month
I've made all three options there. Which one does he want to use as a base, please?
This one?