Trendlines from Function Inside a Strategy  [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

Trendlines from Function Inside a Strategy

Postby MC_Prog » 29 Sep 2015

Hi,

I have a function which draws trendlines (TLs). I have an indicator that calls it and it seems to work fine.

However, when I use the function inside of a strategy, I am not seeing the TLs appear on the chart. My log reports them as being successfully created, but the TL drawings do not appear on the chart.

Are TL drawings from functions disallowed/disabled from inside a strategy?

If not, what else could be causing the difference in behavior?

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

Re: Trendlines from Function Inside a Strategy  [SOLVED]

Postby MC_Prog » 30 Sep 2015

A colleague of mine has found the solution for this. I'll mention it here in case it can help someone else to avoid the problem.

What was needed was the line:

[LegacyColorValue = true];


This line was present in the sub-function and the indicator in question, but not in the strategy. Putting it also in the strategy, the TL drawing is now behaving as expected.

Cheers!


Return to “MultiCharts”