Debug idea of underflow overflow range error for Portfolio Trader Strategy Signal

Questions about MultiCharts and user contributed studies.
denniswklam
Posts: 5
Joined: 22 Nov 2016
Has thanked: 4 times

Debug idea of underflow overflow range error for Portfolio Trader Strategy Signal

Postby denniswklam » 26 Jan 2021

Hello All,

I occasionally encounter an error message

"STD exception : underflow / overflow / range error"

for a Strategy Signal when running forwarding testing within Portfolio Trader, along with a Money Management Signal, usually occurs during an overnight forward testing after a prolonged period..

The strategy signal involves using Postrade*, random functions, while loop, etc. to call for previous trades info and figures within a customized Monte Carlo Simulation function, obtaining similar results to the MC built-in Monte Carlo Simulation Chart figures.

There is no drawing of indicator or trend line involved.

Please kindly advise the insight and direction for me to debug this error.
Thanks in advance.

Best regards,
DL

User avatar
Vlada MultiCharts
Posts: 293
Joined: 22 Apr 2020
Has thanked: 8 times
Been thanked: 76 times

Re: Debug idea of underflow overflow range error for Portfolio Trader Strategy Signal

Postby Vlada MultiCharts » 03 Mar 2021

Hi denniswklam,

We can recommend reproducing the issue in an Offline mode - this would simplify looking for the reason causing the issue.
It's required to detect the bar on which the issue appears and the place in the script during the execution of which the error appears.

You can use the Print keyword for script debugging.
Set the specific conditions the Print command to find the bar on which the issue appears. Then use Print to find the place of the error in the script.

If the issue persists, please send the following files to support@multicharts.com so that we could reproduce the issue on our end:

1) Portfolio Workspace;
2) Exported data in QMD;
3) Used signals in PLA;
4) The description of how to reproduce the issue.

denniswklam
Posts: 5
Joined: 22 Nov 2016
Has thanked: 4 times

Re: Debug idea of underflow overflow range error for Portfolio Trader Strategy Signal

Postby denniswklam » 03 Mar 2021

Thanks Vlada,

I noticed the error has gone after I added ClearPrintLog after a certain time interval to reset the my Print Output I had within the strategy signal for strategy instrument index 0 in Portfolio Trader.

Before the change, I had the Print Output printing texts and values from each strategy signal pass and the money management signal pass continuously in every second. And the error might have been triggered after the printed output log has accumulated to a certain point.

I suspect there is a limitation of Print Output Tab window within PL Editor which caused the error. Is there really a limit to the output window? DL


Return to “MultiCharts”