Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1274
![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
1) Personally, I agree, and if it were up to me, I would simply turn it off and forbid it to be included in the code. But you can't)
2) Thanks, but I haven't found any solution there (it's solved everywhere via OBJ_VLINE object, it doesn't suit me), I'm digging my own way
You can make a grid on some Canvas that some people like. Put the canvas as a background (or front) of the chart, draw over it and follow the geometry/price/time relationship.
It's a pain, but with some taste and time, it can be beautiful.
you can make a grid on some Canvas favourite. Lay out the canvas as the background (or front) of the chart, draw over it and follow the geometry/price/time relationships.
It's painful, but with some taste and time it may be beautiful.
Can you write a simple example on kanvas? please
I don't know a damn thing about it, I just need a rectangle the size of a chart and a vertical line on it
Can you write a simple example on kanvas? please
I don't know a damn thing about it, I just need a rectangle the size of a chart and a vertical line on it.
Should call @Nikolai Semko he's much better with kanvas. And while he's on the road - look at his profile there are many things on the canvas
Can you write a simple example on kanvas? please
I don't know a damn thing about it, I just need a rectangle the size of a chart and a vertical line on it
Funny. Such a glitch only in MT4 and only with vertical lines.
Only mystery is why it interferes. I wouldn't have noticed it in my life.
Can you formulate the problem in more detail to understand the best way to solve it. The interaction of graphical objects with the canvas has nuances.
By the way, one of the possible ways of solving it is to change the manager. ))
If he/she believes that colour changing is a crutch, the more so that kanvas will be a crutch for him/her.
Although I admit that your manager is a fictional character or an allegory. ))
alex_xss:
Can you write a simple example on kanvas? please
I don't know a damn thing about it, I'd just like a rectangle the size of a chart and a vertical line on it.
Not optimal in terms of performance (re-drawing happens more often than it should - just lazy to complicate the code), but it works.
You can implement a canvas for the size of the screen (not the window, for example 1920x1080) and not redraw it at all. It will just take 8 Mbytes of memory.
By the way, changing the grid colour won't help.
Maybe someone has a function for sorting an array (string) alphabetically?
I have one of these, once upon a time sabre wrote
I have one of these, once upon a time a saber wrote
Thank you.
We should call vertical lines.
It is a mystery why it prevents me from using it. I would never have noticed it.
Can you formulate the problem in more detail to understand the best way to solve it. The interaction of graphical objects with the canvas has nuances.
By the way, one of the possible ways of solving it is to change the manager. ))
If he/she believes that colour changing is a crutch, the more so that kanvas will be a crutch for him/her.
Although I admit that your manager is a fictional character or an allegory. ))
Yep, a cool gimmick I've spent almost a week on) My ass is on fire)
Well why would it be an obstacle. There's an indicator that uses triangles to draw. It all turns out beautifully, the colours have been picked up, and now you've noticed such a bug.
The indicator is not for personal use and it is nonsense to release it with this bug. I have to either change the entire drawing, which is quite a pain in the ass because I'm a beginner, or fix the bug.
Change the colour grid does not help, as you have noticed, I have come to this myself) Initially, some colour combinations seemed to help
Changing the grid colour (if it would help) is an unacceptable crutch, since the user may have an influence on it, in case they want to change the colour.
The option to block this function for the user is also not suitable, I think it's clear why)))
The task: to make a user see the grid, if it is enabled, with the same colour always on the screen. Taking into account bugs of MT4 with vertical grid + filled object. I don't know what else to add)
Basically the varic you wrote above is fine. I can polish it. You are a golden man!!! There are simply no words to express my gratitude. I'll give you five bucks for your help.![]()
Just a couple of little questions:
How much lag will I get on weak PCs? I know it's an abstract question, but I'd be happy to hear from you.
"It'll just eat up 8 MB of memory" - I guess you're not talking about RAM?)) If so, 8MB is nothing like
iCanvas is a must, a regular one won't do? It's just another user saying "this file here, this file there". They're so dumb, they won't know where to put it.)
Please advise - answer the question
There is a Bulls.mq4 indicator in Metatrader.
Why does it need an additional buffer, and why can't you just use an intermediate variable
dd = iMA(NULL,0,InpBullsPeriod,0,MODE_EMA,PRICE_CLOSE,i);
ExtBullsBuffer[i]=dd;
The question is that ExtBullsBuffer[i] is used only to store the calculated value of iMA function result and in the next line this value is assigned to indicator buffer element. The ExtBullsBuffer is not used anywhere else. Why this intermediate buffer ExtBullsBuffer is needed here and not just a variable, as it is marked in green in the figure
***