How to improving indicator using "Text"  [SOLVED]

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

How to improving indicator using "Text"

Postby arjfca » 12 Oct 2014

Hello

I was tired to see MC giving me a slow refresh when scrolling over a large numbers of bars so I install MC 64. Sadly, I still have the same issues. Basically, refresh of the chart is done line every .05 second, so not very fluid.

I finally found that the problem is mainly cause by one of my indicator. When I turn it off, scrolling is fluid, turn on, refresh is slow.

I did turn off certain part of the software to realized that the slow down is cause by the section that is using "Text" function to write "-" in the middle of a bar

When I turned off this section, scrolling of the chart is more fluid

Code: Select all


If ShowWRBMiddle = true then begin
If A_WrbWhite or A_WrbBlack then begin
TextVal = text_new_s(Date[1],Time_s[1],WRB_Midpoint(Open[1],Close[1]),"-");
// Print ( Time_s[1], " ", WRB_Midpoint(Open[1],Close[1]):5:5,">");
Value1 = Text_setColor(TextVal, Red);
Value1 = Text_setStyle(TextVal,0,SetStyle );
Value1 = Text_SetSize(TextVal,WRBMiddleSize);
end;
Any idea how to improve it?

Martin

P.S.
Any suggestion on video recorder that I could use to show the problem?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: How to improving indicator using "Text"

Postby TJ » 12 Oct 2014

Hello

I was tired to see MC giving me a slow refresh when scrolling over a large numbers of bars so I install MC 64. Sadly, I still have the same issues. Basically, refresh of the chart is done line every .05 second, so not very fluid.

I finally found that the problem is mainly cause by one of my indicator. When I turn it off, scrolling is fluid, turn on, refresh is slow.

I did turn off certain part of the software to realized that the slow down is cause by the section that is using "Text" function to write "-" in the middle of a bar

When I turned off this section, scrolling of the chart is more fluid

Code: Select all


If ShowWRBMiddle = true then begin
If A_WrbWhite or A_WrbBlack then begin
TextVal = text_new_s(Date[1],Time_s[1],WRB_Midpoint(Open[1],Close[1]),"-");
// Print ( Time_s[1], " ", WRB_Midpoint(Open[1],Close[1]):5:5,">");
Value1 = Text_setColor(TextVal, Red);
Value1 = Text_setStyle(TextVal,0,SetStyle );
Value1 = Text_SetSize(TextVal,WRBMiddleSize);
end;
Any idea how to improve it?

Martin

P.S.
Any suggestion on video recorder that I could use to show the problem?
You can consider using PLOT instead of TEXT. Set the plot to left tick or right tick would give the same effect.

The slow down could also be caused by A_WrbWhite or A_WrbBlack, or WRB_Midpoint.


Having said the above, I think the problem is more than what the snippet shown.

ps. How many drawing ID do you see on your chart?

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

Re: How to improving indicator using "Text"

Postby arjfca » 12 Oct 2014

Hello

I was tired to see MC giving me a slow refresh when scrolling over a large numbers of bars so I install MC 64. Sadly, I still have the same issues. Basically, refresh of the chart is done line every .05 second, so not very fluid.

I finally found that the problem is mainly cause by one of my indicator. When I turn it off, scrolling is fluid, turn on, refresh is slow.

I did turn off certain part of the software to realized that the slow down is cause by the section that is using "Text" function to write "-" in the middle of a bar

When I turned off this section, scrolling of the chart is more fluid

Code: Select all


If ShowWRBMiddle = true then begin
If A_WrbWhite or A_WrbBlack then begin
TextVal = text_new_s(Date[1],Time_s[1],WRB_Midpoint(Open[1],Close[1]),"-");
// Print ( Time_s[1], " ", WRB_Midpoint(Open[1],Close[1]):5:5,">");
Value1 = Text_setColor(TextVal, Red);
Value1 = Text_setStyle(TextVal,0,SetStyle );
Value1 = Text_SetSize(TextVal,WRBMiddleSize);
end;
Any idea how to improve it?

Martin

P.S.
Any suggestion on video recorder that I could use to show the problem?
You can consider using PLOT instead of TEXT. Set the plot to left tick or right tick would give the same effect.

The slow down could also be caused by A_WrbWhite or A_WrbBlack, or WRB_Midpoint.


Having said the above, I think the problem is more than what the snippet shown.

ps. How many drawing ID do you see on your chart?
How many drawing ID do you see on your chart?
Format Object show about 7800 "Text"

Will work on to use Plot instead of text

Martin

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

Re: How to improving indicator using "Text"  [SOLVED]

Postby arjfca » 12 Oct 2014

TJ,
Just to let you know that I got a great improvement using Plot instead of Text in the fluidity of the chart

Many thanks

Martin

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: How to improving indicator using "Text"

Postby TJ » 12 Oct 2014

TJ,
Just to let you know that I got a great improvement using Plot instead of Text in the fluidity of the chart
Many thanks
Martin
It's good to hear the improvement. Thanks for updating us with your result.


Return to “MultiCharts”