drawing object cannot be added during strategy optimization

Questions about MultiCharts .NET and user contributed studies.
3strategy
Posts: 22
Joined: 31 Dec 2014
Has thanked: 2 times
Been thanked: 1 time

drawing object cannot be added during strategy optimization

Postby 3strategy » 19 Jan 2015

During optimization I get the error "drawing object cannot be added during strategy optimization"

I'm using a class that adds the drawing.
The lines that add drawing in included in an if clause

Code: Select all

if (!Signal.Environment.Optimizing)
When I comment the code section that is included in the clause, I no longer get the error.
why I'm getting the error?

The class, OrderEx is for drawing orders and it's included here Drawing Limit Orders

What should I do?
P.S. I'm still waiting for an answer, how to make this class a dll (considering the Multicharts Types it refers to).

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

Re: drawing object cannot be added during strategy optimizat

Postby Henry MultiСharts » 22 Jan 2015

Hello 3strategy,

We were unable to replicate this issue on our end. Please send me the study and workspace you are using for reproducing it.

3strategy
Posts: 22
Joined: 31 Dec 2014
Has thanked: 2 times
Been thanked: 1 time

Re: drawing object cannot be added during strategy optimizat

Postby 3strategy » 22 Jan 2015

Attached.
The errors are thrown by the OrderEx class (DrawOrderLine or DrawPriceChange), and only when the newly added "catch" sections are set to "throw" the exception. Without the "throw" the code runs fluently...

Thanks for your help regarding the dll creation.
Attachments
Capture Optimization error.zip
(32.46 KiB) Downloaded 188 times

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

Re: drawing object cannot be added during strategy optimizat

Postby Henry MultiСharts » 26 Jan 2015

Our engineers are currently analyzing this case. I will keep you updated.

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

Re: drawing object cannot be added during strategy optimizat

Postby Henry MultiСharts » 30 Jan 2015

We were still unable to replicate the issue within 3 hours in MultiCharts .NET64 Version 9.0 Release (Build 10362). Please try adding traces to the code where the drawings are created in order to understand on which drawing the error appears. Does the error appear on each calculation? If not - what are the particular inputs for replicating the error?


Return to “MultiCharts .NET”