PlotPaintBar Problem

Questions about MultiCharts and user contributed studies.
mojotrader
Posts: 87
Joined: 07 Dec 2006

PlotPaintBar Problem

Postby mojotrader » 06 May 2008

The new version of MC seems to have problems painting range bars under certain conditions, especially in fast markets. I've seen at times 10 to 20 bars displayed using default colors defined on the Format Symbol/Style tab real time before the paint bar script catches up. It's as if one thread updates the price marker in real time while another thread processes scripts with significant lag. This problem did not occur with the 2.x version, although there always seemed to be a slight delay painting bars.

The attached image illustrates the problem with one bar. Note the last bar has not been painted while MC either waits for a new tick or some other event to cause my script to be called. Below is my script.

LinReg = LinearRegValue( Price, Length, 0 ) ;
LinReg = XAverage(LinReg,Smoothing);

if LinReg >= LinReg[1] then
PlotPaintBar(High,Low,Open,Close, "PPB", UpColor, BWidth)
else if LinReg <= LinReg[1] then
PlotPaintBar(High,Low,Open,Close, "PPB", DnColor, BWidth);
Attachments
MCPaintBar.jpg
MCPaintBar.jpg (27.4 KiB) Viewed 362 times

User avatar
TJ
Posts: 7192
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 990 times
Been thanked: 2049 times

Postby TJ » 06 May 2008

I noticed the same thing.
It looks like an inch worm making its move... first the tail, then the head pushes forward...
The sight is hilarious.

At first I thought my computer was slow. I upgraded to a quad-core... and the same problem presists.

Then I thought maybe my inept programming skill was inefficient... I checked my code, but I could not find how my code could be simpler.

Oh well... it is not affecting my trading yet...


:oops:

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 14 May 2008

Hi guys,

A slight delay in painting bars is normal.

As for the situation where you had a 10-20-bar delay: what were you plotting? And what was the resolution?

Thank you!

mojotrader
Posts: 87
Joined: 07 Dec 2006

Postby mojotrader » 15 May 2008

Hi guys,

A slight delay in painting bars is normal.

As for the situation where you had a 10-20-bar delay: what were you plotting? And what was the resolution?

Thank you!
The best way to illustrate the problem is with a 50 Point Chart Resolution on ES. You won't see the problem when the market is grinding like it has been during most of the last few weeks. But during econ announcements or when the mkt picks up, the problem becomes very apparent.


Return to “MultiCharts”