Scripts: ToClearComment

 

ToClearComment:

The script removes from the chart a comment located in the upper left corner.

Fig1. An example of such a comment

Author: Nikolay Kositsin

 

If you need not only to delete the comment text, but also to view this deleted text in the future (it may be necessary for some comparison or data analysis in the future), you can also use a free script to delete a comment from the chart, which I published in early December 2013:

 
Dina Paches:

If you need not only to delete the comment text, but also to view this deleted text in the future (it may be necessary for some comparison or analysis of data in the future), you can also use a free script to delete a comment from the chart, which I published in early December 2013:


Your solution is really a bomb!
Especially when compared to the solution proposed by Mr Nikolay Kositsin.
Without DLL I can't even imagine how it could be done? (
Hats off to you.
Nikolay Kositsin
Nikolay Kositsin
  • www.mql5.com
Профиль трейдера
 
Mikhail Dovbakh:

Thank you, Michael!

 

And seriously, since I observed something strange later on the forum, I will add some clarifications (since I did not keep silent to Michael's ironic posts). As much as I don't want to do it, given the tragicomic nature of the situation.

I will refrain from voicing some points (in order not to provoke further development of the topic and squabble). But I write below everything "as it is".


It is not peculiar to me to puff myself up from my ego. I have not positioned myself as an ace of programming and do not position myself.

And I don't need to "measure the length of trunks".


Having given the chronologies below (they are after the "introduction" marked with bold dates), I believe I will add probably previously unknown information to those who have conducted "painstaking investigation and comparison of facts" and "brought the deceiver out into the open".


No matter what anyone thinks (sometimes they can voice such things that instead of a hairdryer you can read - the hair at the roots itself rises), but I highlighted the date in the first post of this topic because of the past repeated manifestations of the desire of some to "punish me" allegedly for a script of one line.

So when I finally saw this script published with really one line, I just automatically linked to my own.

Sorry, some people "helped" to react that way then by their actions (also, not concerning this script).

But it's bad that I "fell for it". The psychological heaviness, tension and fatigue of the last months had an impact. It also affected the fact that initially I did not understand how my first post could be perceived by someone else. I.e., I formulated phrases, "forgetting that there are no telepaths here". Fault. Mine.

It came to me partially, how my post can be perceived by some people, only when having not slept before about two days because of the complexity of solved for myself on other issues and distracted from this periodically preparing my codes for publication in CodeBase, then I saw Mikhail's posts, published the night before the fourth.

The codes, which I was working on at the time when Mikhail was ironising (by bringing "...how could it be done..." not at the beginning of that topic), I sent for moderation to CodeBase on the fifth. They were published then on the 11th - they were "SD Delete indicators" and edits to two old others.

That is, I saw the posts in these two threads in the morning of the next day after their appearance, being myself by that time almost in a somnambulic state due to a combination of various factors. /*I then got sick specifically, and I had to deal with current affairs. So I'm only writing now.

Someone might have thought at the time that I had seen them since the evening, since I was on the site. Although, in fact, I was "glowing with presence here on the site in general" formally, being on the fourth evening and night mostly on the page in CodeBase . And someone could by/think that I was "reading, flailing and puffing up my hcv" .

/*But I hadn't seen those posts yet. Although, yes, sometimes I sometimes keep silent in response (and not only me) for various reasons. Not necessarily negative ones. And definitely not because of my self-esteem. Sometimes it happens, "you nod silently, or smile, or frown at the words of the interlocutor". Somehow like that.

When I saw Mikhail's posts, I was taken aback. And having understood that he ironises, as well as something else (but some of it didn't reach me then), I couldn't help myself and in the same ironic, but not cheerful tone, told him here "thank you"-words. I deleted only then almost immediately the closing sentence, because in this case, at the expense of sad irony, it devalued its meaning.

At the same time, I can't help noting that Mikhail "opened my eyes" to the situation. He respected the participants of that topic. Besides, thanks to Nikolay, Mikhail and some others, something turned over in me and now I have different views on some things.

/*Although someone could have said it in a human way. Not mock. I'm not the only one who realises after publication that it wouldn't hurt to clarify what was said. Sometimes you realise it immediately, sometimes later. Sometimes on your own, sometimes with the help of someone.


I have not communicated on the forum since the 18th of January. I came here only for some current issues or to distract myself from the things I was immersed in.

I do not want to communicate here in the Russian-speaking part of the forum in the future. However it concerns only the forum. And not those interests and affairs with which my life is intertwined here.


Regarding the "investigations" of some I will just give the chronology, including the script:

Hopefully this will clear up some misunderstandings and, at the same time quite possibly replenish the stock of "painstaking comparisons" of some other "investigators" with more than just records of the March 2014 additions. And the old forum thread on MQL4 language, which Michael pulled out from the depths of the years. //Split the sentence

However, I don't have the exact date when the function allowing to get the comment text in MQL5 and MQL4 appeared.


24 August 2010 - confirmation that the function was already in MQL5 at least by that time: https: //www.mql5.com/ru/forum/1848#comment_15890.


16 July 2012 - according to the topic cited by Michael, it can be seen that this function was not yet available in MQL4: https: //www.mql5.com/ru/forum/140428.


December 2013 - my script was published in the Market for MT5 on 9 December and for MT4 on 10 December.

The Market for MT4 programs was officially opened after the release of the 600th build in early February 2014, I don't remember the date, this is from the official information: https: //www.mql5.com/ru/forum/149270.

Before that there were beta versions before the official release.

The publication dates pop up next to the products.

What this script did at that time: it deleted a comment and reported with an alert signal without the text of the deleted comment.

That is, even then it was not a single line of deleting a comment, as some people reproached me, but something filled with additional meaning that I put in for practical use.


The motives for publishing in the Market are the same as for my other products (I don't speak for the products of others, but I suppose many people have the same motives):

We can make on our own different things from what others do, but we can apply something already finished (apply the labour of others), freeing up our time for something else, more interesting and/or pressing for us.

Again, I will digress and say in general, not only about this script: I published something from what I considered useful for myself.

It's not just "spaceships" that are put up in the Marketplace.

Looking at not a little of what is in the Market, you can realise that you can do it yourself. /*I've seen some very simple programmes*/.

But whether you should design something yourself if you can take a ready-made one, freeing up your time (small or big) for something else is a matter for everyone.


Before publishing, I looked to see if there was something already published by someone else in closed or open form. Nor did I publish something else of mine if I saw something similar. /*But in these matters, of course, I "overdid it" to my own detriment.

I can't say for sure whether at that time I saw the topic that Michael brought or not. When checking for publication in the Market, I used to look not at what is written on the forum, but at the availability of the programme (not to publish a duplicate).

Before anyone will come to judge that earlier did not look for such a topic or could know, but did not write anything there - please start with yourself. Do revisions of your codes, find out when what functions appeared. Do a thorough revision of old topics and update them with information. And do so, please, regularly and thoroughly.


27 January 2014 - first reproach to me from one of the Community members that this script is only from one line known to everyone.

Then in one of the threads there was a discussion on another issue. And one of the Community members, angry at me for something else, brought in the post, in the body of the script, the line that Nikolai's script consists of.

This point is not preserved on the forum, but is there saved separately.

I will not bring it here on the forum or in a private message. But to Service Desk or to someone from Administration - yes, of course I can if necessary.


3 February 2014 - the 600th build of MT4 was released, officially dividing the MQL4 language into the former and current ones: https: //www.mql5.com/ru/forum/149270.


8 February 2014 (the script version is the same, it hasn't been replaced yet) - on the discussion page for the MT5 version, a user understandably complains that the script doesn't delete a comment, but only displays an alert. In fact, that user did not have a comment on the chart. That's why the script did not delete those multicoloured numbers that were on the chart in the upper left corner.

But a normal user could legitimately not know that the coloured text was not set through the comment then and now.

Why I am writing about it: This post in the discussion is also on the discussion page of this MT5 script. So there is a user's screenshot attached, where you can see the script alert message of that time.


March 2014 - published a version that has not been replaced to date. Displaying the text of the comment in the alert.

July and October 2014 - there were still some minor changes //I made this addition a bit later. Memory and my marks failed. But the info about it is on the "What's New" page

2016 - due to the fact that I noticed some people's actions concerning "one line" reaching absurdity, I supplemented the main description with a more noticeable emphasis on additional properties of this script, which may be useful.

I did not change the code itself.

Since the 18th of January 2017 - stopped my communication on the forum (having reconsidered some things in myself for other reasons), but periodically came to look - distracted from other things.

30 March 2017 - I went to the MQL5 wall page to see what's new and saw a one-line script for deleting comments posted by Nikolay. Then I saw something else. Some other things came to mind.

Further - you know.

So there was no deception on my part.

There is a tragicomic situation.


P./S: At the same time, I will say that one of the things I have been repeatedly reproached for is when I recommended to look at information in the Help on any relevant issue. Despite the fact that sometimes I tried to explain in passing that the language has changed/added, advised to read articles in passing, and explained that when giving advice on the forum, you can miss (unintentionally or because of the need for a large explanation) or not know some significant details and nuances (when explaining or perceiving). Information on the forum can become outdated over time. In the Help - it is kept up to date. Help has many illustrative examples.

Help is like a "Bible".

P./S: People are different. "You can't please everyone"(s).

 
 
Masterpiece...what a code, what a flight of fancy and inspiration...I'm delighted :)
 
Dina Paches:

Thanks Michael!

.....

I am very sad that you saw irony or "investigation" where there is none.
Thanks to you I was glad to get acquainted with new features of the platform and language.
I looked in the help, but I didn't find the necessary function at once(
That's why I was surprised by the ease and charm of the solution.
I continued searching for more ways on the forum, in the archives.
Thanks to my post in the old thread I got the answer - where to look more diligently...
Sorry for the unintentional upset.
I really, still sincerely, admire your solution.
P.S. The MT developers were left out of the picture, but the main merit in the improvements, flavours of the language and new features is theirs and it is their hard work!
 
Maxim Dmitrievsky:
Masterpiece... what a code, what a flight of fancy and inspiration... I am delighted :)


I once saw a script in KB that placed 3 buy orders in a row with 0.01 lot )).

And actually, someone very green sat down at the terminal, ran the program, it wrote in the comment "You're a jerk!!!". How to delete by means of terminal?

SUS: KB has stopped accepting programmes using Win API. I recently uploaded an owl using it, and they politely told me to redo it. Just for information