Problem with realtime Trendlines (TLs) on point charts?  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 35 times

Problem with realtime Trendlines (TLs) on point charts?

Postby MC_Prog » 21 Sep 2015

Hi.

I'm observing in realtime, on a 1pt chart of TF, with 'Update on every tick' on, that TL_New_BN() continuously returns the same TL ID.

Like so:

12122 09/21/2015 1130 cTFE_CQ_5 TL_Test_02 - BN: 12122 1167 = TL_New_BN( 12117, 1167.90 , 12122 , 1168.40 )
12130 09/21/2015 1131 cTFE_CQ_5 TL_Test_02 - BN: 12130 1167 = TL_New_BN( 12128, 1169.00 , 12130 , 1168.50 )
12150 09/21/2015 1133 cTFE_CQ_5 TL_Test_02 - BN: 12150 1167 = TL_New_BN( 12147, 1167.10 , 12150 , 1167.60 )
12155 09/21/2015 1133 cTFE_CQ_5 TL_Test_02 - BN: 12155 1167 = TL_New_BN( 12150, 1167.60 , 12155 , 1167.10 )
12184 09/21/2015 1133 cTFE_CQ_5 TL_Test_02 - BN: 12184 1167 = TL_New_BN( 12174, 1165.90 , 12184 , 1166.40 )
12189 09/21/2015 1133 cTFE_CQ_5 TL_Test_02 - BN: 12189 1167 = TL_New_BN( 12184, 1166.40 , 12189 , 1165.90 )
12198 09/21/2015 1134 cTFE_CQ_5 TL_Test_02 - BN: 12198 1167 = TL_New_BN( 12193, 1165.50 , 12198 , 1166.00 )
12207 09/21/2015 1134 cTFE_CQ_5 TL_Test_02 - BN: 12207 1167 = TL_New_BN( 12205, 1166.60 , 12207 , 1166.10 )
12239 09/21/2015 1136 cTFE_CQ_5 TL_Test_02 - BN: 12239 1167 = TL_New_BN( 12225, 1165.20 , 12239 , 1165.70 )
12242 09/21/2015 1136 cTFE_CQ_5 TL_Test_02 - BN: 12242 1167 = TL_New_BN( 12240, 1165.80 , 12242 , 1165.30 )
12245 09/21/2015 1136 cTFE_CQ_5 TL_Test_02 - BN: 12245 1167 = TL_New_BN( 12243, 1165.10 , 12245 , 1165.60 )
12250 09/21/2015 1136 cTFE_CQ_5 TL_Test_02 - BN: 12250 1167 = TL_New_BN( 12247, 1165.80 , 12250 , 1165.30 )

In this case, the TL ID returned is 1167 every time, despite being called on successive bars with different arguments.

In the historical data (before realtime), all is fine.

This seems very strange to me, and possibly incorrect.

Here is a picture showing the TLs no longer drawing forward in realtime:

Image


I've attached some code, not completely trivial, but fairly simple, to illustrate.

Of course my first expectation is that I have a problem in my code. I have though spent alot of time on this without a solution and I do not understand why MC is returning the same TL ID as shown above.

Can anyone shed some light on this?
Attachments
TLs_Missing_in_Realtime.png
Picutre showing no TLs drawn in realtime
(30.2 KiB) Downloaded 646 times
TL_Test_02.pla
The code, works historically, but not in realtime
(75.36 KiB) Downloaded 424 times

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

Re: Problem with realtime Trendlines (TLs) on point charts?

Postby TJ » 21 Sep 2015

You should post the code in text... not everybody wants to install your pla in their MultiCharts.

User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 35 times

Re: Problem with realtime Trendlines (TLs) on point charts?

Postby MC_Prog » 21 Sep 2015

You should post the code in text... not everybody wants to install your pla in their MultiCharts.
Perhaps true, but the .pla is mainly intended for MC support, if they are willing to replicate the issue.

User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 35 times

Re: Problem with realtime Trendlines (TLs) on point charts?

Postby MC_Prog » 23 Sep 2015

It really does seem that TL_New_BN() is failing to return successive TL IDs on the point chart once realtime starts. This would be a platform error, no?

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

Re: Problem with realtime Trendlines (TLs) on point charts?

Postby Henry MultiСharts » 23 Sep 2015

Hello MC_Prog,

We are currently analyzing this case.

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

Re: Problem with realtime Trendlines (TLs) on point charts?  [SOLVED]

Postby Henry MultiСharts » 24 Sep 2015

Hello MC_Prog,

Please add the following line to your code:

Code: Select all

[RecoverDrawings = false]

User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 35 times

Re: Problem with realtime Trendlines (TLs) on point charts?

Postby MC_Prog » 24 Sep 2015

Hello MC_Prog,

Please add the following line to your code:

Code: Select all

[RecoverDrawings = false]
Oh my, what a difference that line makes. THANK YOU!


Return to “MultiCharts”