TrendLine ID# conflicts

Questions about MultiCharts and user contributed studies.
sptrader
Posts: 620
Joined: 09 Apr 2010
Location: Colorado
Has thanked: 388 times
Been thanked: 227 times
Contact:

TrendLine ID# conflicts

Postby sptrader » 06 Jan 2012

I'm not sure how trendline ID# are assigned (I assume it's the order that they are created)..
I'm having a conflict between 2 studies that both use trendlines.. when I apply both studies to a chart, the trendline colors and style are changed by the other study.. Somehow I need to change the trendline ID#'s of one of the studies to stop the conflict, how can I do that ?? ( I didn't see anything in the help menu regarding changing or assigning trendline ID's)..

User avatar
TJ
Posts: 6521
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: TrendLine ID# conflicts

Postby TJ » 06 Jan 2012

sptrader wrote:I'm not sure how trendline ID# are assigned (I assume it's the order that they are created)..
I'm having a conflict between 2 studies that both use trendlines.. when I apply both studies to a chart, the trendline colors and style are changed by the other study.. Somehow I need to change the trendline ID#'s of one of the studies to stop the conflict, how can I do that ?? ( I didn't see anything in the help menu regarding changing or assigning trendline ID's)..

Do you have any TL_Delete in the code?

sptrader
Posts: 620
Joined: 09 Apr 2010
Location: Colorado
Has thanked: 388 times
Been thanked: 227 times
Contact:

Re: TrendLine ID# conflicts

Postby sptrader » 06 Jan 2012

TJ wrote:
sptrader wrote:I'm not sure how trendline ID# are assigned (I assume it's the order that they are created)..
I'm having a conflict between 2 studies that both use trendlines.. when I apply both studies to a chart, the trendline colors and style are changed by the other study.. Somehow I need to change the trendline ID#'s of one of the studies to stop the conflict, how can I do that ?? ( I didn't see anything in the help menu regarding changing or assigning trendline ID's)..

Do you have any TL_Delete in the code?

************************************************************************
No TL_Delete, am I supposed to ?? (I want both studies on at the same time, they do different things)..

User avatar
TJ
Posts: 6521
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: TrendLine ID# conflicts

Postby TJ » 06 Jan 2012

sptrader wrote:
TJ wrote:
sptrader wrote:I'm not sure how trendline ID# are assigned (I assume it's the order that they are created)..
I'm having a conflict between 2 studies that both use trendlines.. when I apply both studies to a chart, the trendline colors and style are changed by the other study.. Somehow I need to change the trendline ID#'s of one of the studies to stop the conflict, how can I do that ?? ( I didn't see anything in the help menu regarding changing or assigning trendline ID's)..

Do you have any TL_Delete in the code?

************************************************************************
No TL_Delete, am I supposed to ?? (I want both studies on at the same time, they do different things)..


No, I am asking, not because you are supposed to. But because if you do, and if coded incorrectly, can create ID errors.

Well, the IDs don't cross unless you have done something to make them cross.
You cannot change IDs, and you are not supposed to anyway, because the ID will increment each time you draw a new one.

You can right click on the chart, go to Format Drawings and see how many drawing object IDs you have.
These users thanked the author TJ for the post:
JoshM

sptrader
Posts: 620
Joined: 09 Apr 2010
Location: Colorado
Has thanked: 388 times
Been thanked: 227 times
Contact:

Re: TrendLine ID# conflicts

Postby sptrader » 08 Jan 2012

Thanks TJ !
I think I found the problem, one of my TL studies was originally plotting 6 TL's and I changed it to only one TL, BUT, I forgot to remove the formatting (style, thickness, color etc) from the other 5. Once I commented out the formatting for the unused TL's, it worked..
These users thanked the author sptrader for the post:
TJ

User avatar
TJ
Posts: 6521
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: TrendLine ID# conflicts

Postby TJ » 08 Jan 2012

sptrader wrote:Thanks TJ !
I think I found the problem, one of my TL studies was originally plotting 6 TL's and I changed it to only one TL, BUT, I forgot to remove the formatting (style, thickness, color etc) from the other 5. Once I commented out the formatting for the unused TL's, it worked..

Thanks for the update. It is good to hear everything worked out.


Return to “MultiCharts”