How do I learn to create graphical objects? MQL4. - page 8

 
Artyom Trishkin:
His subframe is unambiguously 1, as he himself said that there is only one indicator on the chart. I have told him to prescribe the subwindow number equal to 1 in the code and to see how the lines will be drawn in the window of his indicator but I do not remember him to do it. His mistake is obviously stupid.

I've tried that, too.

 ResetLastError();
            //--- создадим трендовую линию по заданным координатам
           if(!ObjectCreate(chart_ID,nameobj,OBJ_TREND,1,Time[index],maximum1,Time[1],TRENDmax[1]))
            {
            Print(__FUNCTION__,
                  ": не удалось создать линию тренда! Код ошибки = ",GetLastError());
            return(0);
            }

And so.

         int J=1;      
            //--- сбросим значение ошибки
            ResetLastError();
            //--- создадим трендовую линию по заданным координатам
           if(!ObjectCreate(chart_ID,nameobj,OBJ_TREND,J,Time[index],maximum1,Time[1],TRENDmax[1]))
            {
            Print(__FUNCTION__,
                  ": не удалось создать линию тренда! Код ошибки = ",GetLastError());
            return(0);
            }

What to sayint J=WindowsTotal();returns FSDV EURUSD,Daily: J=1

And I've done many more variants, including what was said.


 

Also thought my indicator was the problem. Decided to just add another standard indicator and unprint it.

double rsi=iRSI(NULL,0,14,PRICE_CLOSE,1);
Print("Количество окон = ", WindowsTotal());

2015.10.26 22:28:05.994        2014.12.30 23:59  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.994 2014.12.30 00:00  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.994 2014.12.29 00:00  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.994 2014.12.26 00:00  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.994 2014.12.24 00:00  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.992 2014.12.23 00:00  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.992 2014.12.22 00:00  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.992 2014.12.19 00:00  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.992 2014.12.18 00:00  FSDV EURUSD,Daily: Количество окон = 1

2015.10.26 22:28:05.991 2014.12.17 00:00  FSDV EURUSD,Daily: Количество окон = 1

 
forexman77:

Also thought my indicator was the problem. Decided to just add another standard indicator and unprint it.


Maybe you can throw in your magic indicator, which is not visible in the terminal? :)))

After all, miracles don't happen ;))

 
Karputov Vladimir:
Create a template with the indicator and save this template under the name tester.

I hadn't considered it. This was the problem. Right-click to create a template called Tester. And voila, everything works.

There's nothing in the help about it. You have written a mountain of stuff, but the reason is simple.

 
forexman77:

I hadn't considered it. This was the problem. Right-click to create a template called Tester. And voila, everything works.

There's nothing in the help about it. A mountain of things have been written, and the reason is simple.

That's fine.
 
Karputov Vladimir:
Oh, goody.

That's just great!

Like on What? Where? When?

There was a correct answer in the debate, but somehow I missed it.)

 
forexman77:

That's just great!

Like on What? Where? When?

There was a correct answer in the polemic, but I somehow missed it).

Judging from what we talked about, you got it by accident. You still don't understand the reason. Although it's as clear as 2x2 to me.

I'm sorry, the right answer is what? The pattern? ...

 
Artyom Trishkin:

From what we've talked about, it looks like you had an accident. You still don't understand the reason. Although it's as clear as 2x2 to me.

The correct answer, sorry, is in what? The template? ...

Of course it is. After I created the template, the window with the indicator started to appear immediately after the start. And before that, only after the visual run was over, so there was no window during it.

int w=WindowsTotal();
Print("количество окон=",w);
2015.10.27 14:26:48.214 2014.11.10 00:00  FSDV1 EURUSD,Daily: количество окон=2

THERE ARE TWO.

 
forexman77:

Sure. After creating the template, the indicator window started to appear immediately after start-up. And before that, only after the end of the visual run, so there was no window during it.

THERE ARE TWO.

It is strange that you, running the test in visual mode and seeing no indicator window on the chart, tried to find it and started a coven. Who prevented you from placing the indicator on the visualization chart?
 
Artyom Trishkin:
It's very strange that you, running the test in visual mode and seeing that the indicator window is not on the chart, tried to find it and started a coven. Who stopped you from placing the indicator on the visualization chart?
You probably like to argue, but not at the right place. The solution is found, I don't need anything else.
Reason: