Hello
Is there a way that I could look on a chart to find a given text that was manually intalled and if found replace it?
I did look in the Text Manipulation code but did see nothing regarding that.
Martin
Using code: Finding "Text" on a chart [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Using code: Finding "Text" on a chart
Hello Martin,
Do you want to find a specific string using code?
Do you want to find a specific string using code?
Re: Using code: Finding "Text" on a chart
YesHello Martin,
Do you want to find a specific string using code?
I want to adjust to the right side of the screen some specific commentary that I put on the screen like "WRB"
I did not found the function that allow me to search trough all text on the chart
Martin
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Using code: Finding "Text" on a chart
There is no such rebuilt function. You will need to create your own one that loops through all of the drawings on the chart, gets their values and checks if there is one that matches the required string.
Re: Using code: Finding "Text" on a chart
Henry,There is no such rebuilt function. You will need to create your own one that loops through all of the drawings on the chart, gets their values and checks if there is one that matches the required string.
Witch function would allow me to evaluate each drawing
Martin
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Using code: Finding "Text" on a chart [SOLVED]
Here is a sample code:
Code: Select all
input: What2Find("hello");
Value1 = Text_GetFirst(3);
While Value1 <> -2 Begin
if What2Find = text_getstring(Value1) then break;
Value1 = Text_GetNext(Value1, 3);
End;
Plot1(Value1);