Multiple data streams rectangle drawing issue  [SOLVED]

Questions about MultiCharts and user contributed studies.
PD Quig
Posts: 191
Joined: 27 Apr 2010
Location: San Jose
Has thanked: 67 times
Been thanked: 10 times

Multiple data streams rectangle drawing issue

Postby PD Quig » 12 Jan 2019

I finally got around to trying out the rectangle functionality new in release 12 and ran into my usual multiple data stream difficulty. Not having code-based rectangle drawing, some years ago I used three lines to define volume zones (vertical start line, a top line, and a bottom line). It looked like this with the indicator based on data2:
Line_method_looked_like_this.png
(41.49 KiB) Downloaded 428 times
It worked but I always disliked the look of it. So, using identical logic with new rectangle keywords, I implemented rectangles and it gives a much better, easier to work with look: Here's how that same data looks using rectangles. However, in this picture the indicator is based on data1....
Rectangles_vs_lines.png
(42.08 KiB) Downloaded 428 times
...because unfortunately, the indicator does not work when it is pointed at the 8 range data stream in data2. Instead, I get this:
How_it_looks.png
(58.04 KiB) Downloaded 428 times
Instead of rectangles I get what appears to be only the bottom lines of the rectangles. Maybe it has to do with MaxBarsBack being different on the two charts? Doesn't make sense to me.

Here are the relevant rectangle key word parts of the code:

This does the initial plot of the green rectangles--

Code: Select all


VZ_G_ID[VG_Count] = RectangleNew_BN(VZ_G_Signal_Bar[VG_Count], VZ_GH[VG_Count],
VZ_G_Break_Bar[VG_Count], VZ_GL[VG_Count]);
RectangleSetFillColor(VZ_G_ID[VG_Count], Demand_Zone_Color);
RectangleSetColor(VZ_G_ID[VG_Count], Color_VZ_Green_Outline);
RectangleSetStyle(VZ_G_ID[VG_Count], tool_solid);
RectangleSetSize(VZ_G_ID[VG_Count], 0.5);
This updates the rectangle end point as time marches on--

Code: Select all

for value1 = 1 to VG_Count begin

RectangleSetEnd_BN(VZ_G_ID[value1], VZ_G_Break_Bar[value1] , VZ_GL[value1]);
end;
Also: the 3rd parameter of RectangleSetEnd_BN doesn't make any sense to me. It seems to me that this function should only need two parameters: 1) the rectangle ID and 2) the bar number of the desired end.

Any insights / ideas would be greatly appreciated.

-pdq
Attachments
How_it_should_look.png
(60.54 KiB) Downloaded 428 times
Last edited by PD Quig on 18 Jan 2019, edited 4 times in total.

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Multiple data streams rectangle drawing issue

Postby Anna MultiCharts » 15 Jan 2019

Hello, PD Quig!

Please provide your workspace + simplified indicator in PLA so we could reproduce and analyze this.

PD Quig
Posts: 191
Joined: 27 Apr 2010
Location: San Jose
Has thanked: 67 times
Been thanked: 10 times

Re: Multiple data streams rectangle drawing issue

Postby PD Quig » 18 Jan 2019

Anna, I have raised an (MC-2549 - RectangleNew_BN plots improperly on a multi-datastream chart). I'm attaching the workspace and .pla here and have also sent the same directly to Henry.
Attachments
Rectangle Test.wsp
(302.48 KiB) Downloaded 212 times
$Rectangle_Test_v1.0.pla
(16.68 KiB) Downloaded 233 times

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Multiple data streams rectangle drawing issue

Postby Anna MultiCharts » 28 Jan 2019

PD Quig,

Thanks for the files. The issue has been replicated now. The fix is targeted for MultiCharts 12 Release 6.

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Multiple data streams rectangle drawing issue  [SOLVED]

Postby Anna MultiCharts » 11 Apr 2019

This bug was fixed in MultiCharts 12 Release 6. You can download it here: http://www.multicharts.com/trading-software-download/

PD Quig
Posts: 191
Joined: 27 Apr 2010
Location: San Jose
Has thanked: 67 times
Been thanked: 10 times

Re: Multiple data streams rectangle drawing issue

Postby PD Quig » 11 Apr 2019

Thanks, Anna!


Return to “MultiCharts”