Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 969
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
The indicator does not work correctly. When it is removed from the graph, the text does not disappear.
I'm not strong in programming, so I'm appealing to experts. Please correct the turkey, I would be grateful.
And the default indicator colour is black, it is desirable to change it.
I would also like to be able to install it in any place on the chart.
Thank you.
You can remember the visible prices and times on the chart and compare them as soon as the chart is stretched or whatever and the visible areas decrease or increase. You can place invisible labels on the chart at a certain distance, memorize the distance, and compare.
Easier by Mach values, comparing by pips*Point, defined by optimisation!
Function: ChartTimePriceToXY
https://docs.mql4.com/ru/chart_operations/charttimepricetoxy
Pass the MA values into it, get the pixel coordinates relative to the chart window, and then write an algorithm for calculating the distance between the two points.
The indicator does not work correctly. When it is removed from the graph, the text does not disappear.
I'm not strong in programming, so I'm appealing to experts. Please correct the turkey, I would be grateful.
And the default indicator colour is black, it is desirable to change it.
I would also like to be able to install it in any place on the chart.
Thank you.
I.e. you can change the colour yourself when calling the indicator in the input parameters, or, assign another colour in the programme, by default.
The program does not remove objects when the indicator is removed from the chart. This is the line in deinit()
You should remove the check if(windex>0). Leave only deletion of all objects.
Try to correct it yourself. The colour of objects is set in the line
I.e., you can change the colour yourself when calling the indicator in the input parameters, or, assign a different colour in the programme, by default.
The programme does not remove objects when the indicator is removed from the chart. This is the line in deinit()
You should remove the check if(windex>0). Leave only deletion of all objects.
Thank you, good man! I practically did it. I have removed the checkif(windex>0), but when I remove an indicator
itdeletes all graphical objects that draw other indicators, which at the same time are on the chart.
What can I do?
Thank you again.
Thank you, kind man! It almost worked, I removed the checkif(windex>0), but now when I remove the indicator
all graphical objects that draw other indicators, which at the same time are hanging on the chart, are deleted.
What can I do?
Thank you again.
In this case the deletion of objects should be as follows
In this case, deleting objects should be
It did not help.
Only the indicator header (uppermost line) is deleted, the captions in the second line on the chart remain.
It didn't help.
Only the indicator header (uppermost line) is deleted, the captions in the second line on the chart remain.
Right... I didn't look carefully. Add another line