EXCEPTION Error

Questions about MultiCharts and user contributed studies.
waldem
Posts: 115
Joined: 18 Nov 2013
Has thanked: 3 times
Been thanked: 4 times

EXCEPTION Error

Postby waldem » 27 Feb 2014

hallo all, sometime I got the "Exception error" on my Portfolio Backtester.

should be possible to have in the error windows the name of the stocks that cause the problem?
this because if you have a big list of stocks is very complicated understand which one have problem and discard it.

there is one wiki with the explanation of this error?
Attachments
exception.jpg
(68.44 KiB) Downloaded 1060 times

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

Re: EXCEPTION Error

Postby Henry MultiСharts » 27 Feb 2014

Hello waldem,

Please see the following guide: Floating-Point_Division_by_Zero_Error_Message

waldem
Posts: 115
Joined: 18 Nov 2013
Has thanked: 3 times
Been thanked: 4 times

Re: EXCEPTION Error

Postby waldem » 28 Feb 2014

hallo, thank you, this is a good method when you have single chart, even if when you have very long code is complex to find the bad variable.

in any case this does not work for portfolio, is not possible for you to state which is the stock with error that i can simply delete from portfolio?

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

Re: EXCEPTION Error

Postby Henry MultiСharts » 28 Feb 2014

waldem, if there is no zero division protection in the code then the error can appear both in MultiCharts and Portfolio Backtester. Please follow the instructions from the article I have provided above to troubleshoot your code and avoid getting the floating point message.

I will forward your suggestion regarding showing the instrument name that generated the error to our management.

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

Re: EXCEPTION Error

Postby TJ » 28 Feb 2014

hallo, thank you, this is a good method when you have single chart, even if when you have very long code is complex to find the bad variable.
in any case this does not work for portfolio, is not possible for you to state which is the stock with error that i can simply delete from portfolio?
Just open your code in the PowerLanguage Editor,
then press Control-F,
the "Find" window will pop up.

Type a 'slash' in the search box. (ie the division sign "/" )

Go through each and every division you have in your code and you will soon find the problem.
ps. Don't let the error message intimidate you; it is not an insurmountable task... it won't take a lot of time to debug, because you can't have that many divisions in one code, even if you have tens of thousands of lines.

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

Re: EXCEPTION Error

Postby Henry MultiСharts » 03 Mar 2014

in any cse this does not work for portfolio, is not possible for you to state which is the stock with error that i can simply delete from portfolio?
This improvement is targeted to MultiCharts 9.0


Return to “MultiCharts”