Found a bar that has a Text box attached to it: Possible?

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Found a bar that has a Text box attached to it: Possible?

Postby arjfca » 20 Apr 2015

Hello

A Text box is manually installed over a chart. Is there a way to find using PowerLanguage. witch bar is attached with the Text box?
2015-04-20_06-04.jpg
(86.99 KiB) Downloaded 759 times
Martin

kernel
Posts: 91
Joined: 19 Feb 2013
Has thanked: 21 times
Been thanked: 4 times

Re: Found a bar that has a Text box attached to it: Possibl

Postby kernel » 20 Apr 2015

Hi Martin,

Try Text_getactive and Text_GetBarNumber.

Code: Select all


print(" bar#=", text_getbarnumber(text_getactive()));
cheers,

-K

Meecc
Posts: 50
Joined: 23 Jun 2011
Has thanked: 22 times
Been thanked: 7 times

Re: Found a bar that has a Text box attached to it: Possibl

Postby Meecc » 20 Apr 2015

Please see a similar case using arrow on chart
with binary search by bowlesj3

http://www.multicharts.com/discussion/v ... f=5&t=7749

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Found a bar that has a Text box attached to it: Possibl

Postby arjfca » 20 Apr 2015

Please see a similar case using arrow on chart
with binary search by bowlesj3

http://www.multicharts.com/discussion/v ... f=5&t=7749
Hello
Meecc

Thanks for your suggestion. I'm already using the search arrow and center my chart around it.
This function is called using a click over a given position on my charts.

Now, I want to use it for Text (number). I just did not found a function to return the position of a text box over a chart

Here is a daily chart that I marked the reversal
Now, I want to scall down to 15 min and study how was done the reversal.
2015-04-20_08h49_16.jpg
(210.91 KiB) Downloaded 786 times
The value to search (number in string) will be in a Global Variable set by Excel. MC to read the string value and search for it on the chart. All I need for now is a function to look for the position of a text box containing a given value.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Found a bar that has a Text box attached to it: Possibl

Postby Henry MultiСharts » 24 Apr 2015

Hello Martin,

Have you tried the solution provided by kernel?
Try Text_getactive and Text_GetBarNumber.

Code: Select all

print(" bar#=", text_getbarnumber(text_getactive()));

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Found a bar that has a Text box attached to it: Possibl

Postby arjfca » 24 Apr 2015

Hello Martin,

Have you tried the solution provided by kernel?
Try Text_getactive and Text_GetBarNumber.

Code: Select all

print(" bar#=", text_getbarnumber(text_getactive()));
Thanks to poke on this post and the remind. I had not seen Kernel responce

I will work on that this weekend

Martin

Meecc
Posts: 50
Joined: 23 Jun 2011
Has thanked: 22 times
Been thanked: 7 times

Re: Found a bar that has a Text box attached to it: Possibl

Postby Meecc » 29 Apr 2015

Hello Martin,

Have a try on the following code pattern:

Text_GetFirst(7);

while (TextID <> -2)
Text_GetString(TextID);
Text_GetBarNumber(TextID);
Text_GetNext(TextID,7);


Return to “MultiCharts”