TrendLine ID# conflicts

Questions about MultiCharts and user contributed studies.
sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 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: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: TrendLine ID# conflicts

Postby TJ » 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)..
Do you have any TL_Delete in the code?

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: 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)..
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: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: TrendLine ID# conflicts

Postby TJ » 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)..
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.

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 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..

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

Re: TrendLine ID# conflicts

Postby TJ » 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..
Thanks for the update. It is good to hear everything worked out.


Return to “MultiCharts”