Removing an indicator remove drawn objects  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
gbulle
Posts: 14
Joined: 18 Apr 2014
Has thanked: 2 times
Been thanked: 2 times

Removing an indicator remove drawn objects

Postby gbulle » 18 Mar 2015

Hello,

I developed an indicator that draws in a sub chart several text objects:
example:
ChartPoint bottom = new ChartPoint(start_date, -0.8 )
ITextObject textObj = DrwText.Create(bottom, "A",true )

When I remove the indicator from the chart all text objects are removed too!!.
I would like to preserve the drawn objects.
This does not work:
protected override void Destroy(){
}


Any suggestion?
TX

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

Re: Removing an indicator remove drawn objects

Postby Henry MultiСharts » 19 Mar 2015

Hello gbulle,

In MultiCharts please go to File->Preferences->Charting->enable the option “Do not delete drawings created by a study if a study is deleted”.

gbulle
Posts: 14
Joined: 18 Apr 2014
Has thanked: 2 times
Been thanked: 2 times

Re: Removing an indicator remove drawn objects

Postby gbulle » 19 Mar 2015

Thank you very much.

I did what you said checking the checkbox but the objects still disappear when removing the indicator; the same if i uncheck.
I repeated the process twice to be sure!!

Attached my simple test indicator: it draws a letter in a subchart in correspondence of a date
plus x days.

And, if possible, how to do the same using the code?

Thanks
Attachments
MyCycle.pln
(2.64 KiB) Downloaded 393 times

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

Re: Removing an indicator remove drawn objects  [SOLVED]

Postby Henry MultiСharts » 26 Mar 2015

gbulle, you need to place drawings on the instrument's series, not on the indicator subchart.


Return to “MultiCharts .NET”