Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 09-26-2009, 05:13 AM   #1
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

TL_SetStyle Bug



Hello everybody !

It tooks long time and investigations before I've found a bug which slowed down mysteriously but dramatically MC

In my pivot script I've added these lines

inputs:
...
PivotStyle( 2 ), // or 3
PivotSize ( 4 ),

...

TL_SetStyle(TL_PP, PivotStyle);
TL_SetSize(TL_PP, PivotPPSize );

Execpt 1 ( Tool_Solid ________________ )

all the others styles values must never be more than 1 !

Hope that it helps
Attached Thumbnails
TL_SetStyle Bug-aa.jpg  
aaa is offline  
Reply With Quote
Old 09-26-2009, 10:06 AM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: TL_SetStyle Bug

Quote:
Originally Posted by aaa »
...
all the others styles values must never be more than 1 !

Hope that it helps

not sure if I understand what you mean.
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 09-26-2009, 10:07 AM   #3

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: TL_SetStyle Bug

Quote:
Originally Posted by aaa »
[IMG]
It tooks long time and investigations before I've found a bug which slowed down mysteriously but dramatically MC

see this post...
http://www.traderslaboratory.com/for...html#post64333



.
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 09-26-2009 at 10:30 AM.
Tams is offline  
Reply With Quote
Old 09-26-2009, 05:05 PM   #4
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: TL_SetStyle Bug

Quote:
that's because there is an error in coding:
the code is adding a NEW trendline at every bar.
the dotted line you see is not a dotted line...
each dot is actually a trendline; if you click on the dot, you can drag the dot out and see the trendline.

You were right Tams and I don't know why I haven't read this post before = I should wear glasses, or stop drinking !!!



In a script, If we add

TL_SetSize(Value99, 4 ); // 4 is an example, in fact a thickness more than 0

to a trendLine (value99) Dashed or Dotted

It transforms each Dash or Dot in an object

Pivots starts to be heavy to manage for the GPU/CPU

This is why it is not possible to increase the weight in the format study (?)



I hope that my post is clearest now and I'll be please to clearer it more if needed.

Sincerely Yours

aaa
Attached Thumbnails
TL_SetStyle Bug-aa.jpg  

Last edited by aaa; 09-26-2009 at 05:19 PM.
aaa is offline  
Reply With Quote
Old 09-26-2009, 05:41 PM   #5

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: TL_SetStyle Bug

Quote:
Originally Posted by aaa »
...
This is why it is not possible to increase the weight in the format study (?)

First thing first... the picture above is for PLOT, not trendline.
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 09-26-2009, 05:43 PM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: TL_SetStyle Bug

Quote:
that's because there is an error in coding:
the code is adding a NEW trendline at every bar. <-- I mean it should not be doing it. It should draw ONE line and that's it.
the dotted line you see is not a dotted line...
each dot is actually a trendline; if you click on the dot, you can drag the dot out and see the trendline.

go to your chart...

click on your trendline... hold down the mouse... and DRAG the line away.

what do you see?

do you see another line there?



.
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 09-26-2009 at 05:59 PM.
Tams is offline  
Reply With Quote
Old 09-28-2009, 03:32 AM   #7
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: TL_SetStyle Bug

do you see another line there?

Before = Yes = CPU > 40 %

Now = No = CPU < 10 %

YhanX Tams, always helpfull for beginners

Have a nice Week
aaa is offline  
Reply With Quote
The Following User Says Thank You to aaa For This Useful Post:
Tams (10-28-2009)

Reply

Tags
trendline

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


All times are GMT -4. The time now is 09:50 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.