Hello
Text put on chart via an indicator is erased when the chart is reload or modify via a new scale.
When text is manually written on the chart, it will be kept after saving and reloaded.
How can I keep the text created via an indicator to be permanent?
Martin
Keeping text from indicator on screen [SOLVED]
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Keeping text from indicator on screen [SOLVED]
Hello
Text put on chart via an indicator is erased when the chart is reload or modify via a new scale.
When text is manually written on the chart, it will be kept after saving and reloaded.
How can I keep the text created via an indicator to be permanent?
Martin
You cannot... what is created by an indicator is always changed when the indicator is changed.
Re: Keeping text from indicator on screen
OK. Thanks TJHello
Text put on chart via an indicator is erased when the chart is reload or modify via a new scale.
When text is manually written on the chart, it will be kept after saving and reloaded.
How can I keep the text created via an indicator to be permanent?
Martin
You cannot... what is created by an indicator is always changed when the indicator is changed.
Then, easier to put text manually.
Later, I will try to save the Text and attribute to replace them after.
Martin
Re: Keeping text from indicator on screen
@TJ
What lets you make this statement ?
@arjfca
If your indicator sets a text due to your conditions, write a readable file with the location where the text was set. You can read this file via ELC easily and set the text where it was originally set. You could extend the usage for different time frames etc etc. Some of work, but you can do it AND(!!!) it is not impossible.
Kind Regards.
Ben
What lets you make this statement ?
@arjfca
If your indicator sets a text due to your conditions, write a readable file with the location where the text was set. You can read this file via ELC easily and set the text where it was originally set. You could extend the usage for different time frames etc etc. Some of work, but you can do it AND(!!!) it is not impossible.
Kind Regards.
Ben
Re: Keeping text from indicator on screen
Hello Ben. Maybe I did not well explain. That exactly that what I intend to do. But for the moment, it is easier to write Text manually since it will stick on the chart.@TJ
What lets you make this statement ?
@arjfca
If your indicator sets a text due to your conditions, write a readable file with the location where the text was set. You can read this file via ELC easily and set the text where it was originally set. You could extend the usage for different time frames etc etc. Some of work, but you can do it AND(!!!) it is not impossible.
Kind Regards.
Ben
The Text that I put on screen is only a reference number. I got a routine that will place an incremental number on the chart at the location of a click. These number are not calculate
That routine use the mouse click + shift key to determine the location. A variable is incremented
I use these numbers as a reference on a Note file.
Martin
- Attachments
-
- Number.png
- (90.81 KiB) Downloaded 1108 times
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Keeping text from indicator on screen
@TJ
What lets you make this statement ?
::
Kind Regards.
Ben
@bensat
What lets you make this statement ?
Re: Keeping text from indicator on screen
@TJ
Where I am coming from it's a very unfriendly & offensive act to ask a question while being asked for something. But I am able to answer your question.
Due to successful implementation of a database for 'Footprint'-values, at a time Footprint wasn't implemented in Multicharts, we were able to store and reload Footprint-values for each time frame and symbol back to the point it was saved and stored. Same today for 'Bookmap' and many other studies. That makes me believe your answer was wrong.
Kind Regards.
Ben
Where I am coming from it's a very unfriendly & offensive act to ask a question while being asked for something. But I am able to answer your question.
Due to successful implementation of a database for 'Footprint'-values, at a time Footprint wasn't implemented in Multicharts, we were able to store and reload Footprint-values for each time frame and symbol back to the point it was saved and stored. Same today for 'Bookmap' and many other studies. That makes me believe your answer was wrong.
Kind Regards.
Ben
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Keeping text from indicator on screen
I haven't tested this, but what about creating several manual text boxes on the chart, and then having the indicator access those? This latter is something we can do with the Text_GetNext() and Text_GetFirst() keywords.Text put on chart via an indicator is erased when the chart is reload or modify via a new scale.
When text is manually written on the chart, it will be kept after saving and reloaded.
How can I keep the text created via an indicator to be permanent?
The idea behind this suggestion is that the text box is not created by the indicator script (no `Text_New_*` usage) and therefore might remain when the indicator is turned off/on.
Otherwise I'd use Ben's approach, since that works for sure.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Keeping text from indicator on screen
It's very cool that MultiCharts can indeed do this.I haven't tested this, but what about creating several manual text boxes on the chart, and then having the indicator access those?
Example:
Code: Select all
Variables:
currentTextBox(0);
once (CurrentBar = 10) begin
currentTextBox = Text_GetFirst(7);
while (currentTextBox > 0) begin
// Update the text and style of the text box
Text_SetString(currentTextBox, "Example");
Text_SetBGColor(currentTextBox, yellow);
Text_SetColor(currentTextBox, red);
// After updating the text box, go to the next
currentTextBox = Text_GetNext(currentTextBox, 7);
end;
end;
Then with adding the indicator the text boxes have their appearance change:
But then if we remove the indicator, the text boxes and their formatting remain:
Now this approach might not work for you, depending if you can know beforehand the approximate amount of text boxes you need. Because when you do know that, you can create a pool of manual text boxes that the indicator can then access and update.
Perhaps giving the text boxes a special feature (like colour, size, or first character of the content) might be a good idea also, since then the indicator can differentiate between the text boxes intended to be updated (since they have that common feature) and the other text boxes (which the script should leave alone).
- Attachments
-
- 2016-08-29_18-35-19.png
- (12.45 KiB) Downloaded 1138 times
-
- 2016-08-29_18-35-03.png
- (13.1 KiB) Downloaded 1134 times
-
- 2016-08-29_18-32-39.png
- (12.35 KiB) Downloaded 1135 times
Re: Keeping text from indicator on screen
@JoshM
Awesome. Thank you. Opens up my mind for even more ideas (set a text file and read it for the variables where and what to set as text in the chart).
Kind Regards.
Ben
Awesome. Thank you. Opens up my mind for even more ideas (set a text file and read it for the variables where and what to set as text in the chart).
Kind Regards.
Ben