When running a successfully compiled strategy in WLP, the DrawLine function fails (nothing is drawn in the PricePane), but changing the double value parameter to double constant works, though. After the DrawLine failure, the WLP.log contains errors like the following:
2015-04-23 22:36:31,299 [1] ERROR WealthLabPro.ChartForm [(null)] - Overflow error.
The value prints to the debug window showing a value in the range of the bars on the PricePane - so it's not an overflow and should not be invisible. If the value for the DrawLine is the constant (from the debug window), then DrawLine works and the line is visible as expected.
There's too much code to post right now and there doesn't appear anything like this here
http://www2.wealth-lab.com/WL5Wiki/kbErrorsStrategy.ashx?HL=error,wealthlabpro or in the forum. Further searches on the wiki are fruitless.
Thanks in advance for any and all help.
BTW this is WLP 6.8 64 bit.
Size:
Color:
Since that "Overflow error" is too general to be helpful and may be misleading, please show some example code that reliably demonstrates the error. Don't forget to indicate the data you're working with: data provider, bar scale, symbol (for single-stock backtest, or symbols if multi-symbol backtest), data loading range.
As an alternative, you could try debugging your Strategy code:
How can I debug my trading strategies in Wealth-Lab?P.S.
QUOTE:
there doesn't appear anything like this here
Actually it does:
#1,
#2 and
#3.
Size:
Color:
Thanks, Eugene. I'm missing something with the Forum search. After searching for overflow (and waiting), no results were returned. What I am doing wrong?
I'm working on stripping down the code to reproduce the error. Stay tuned. Film at 11.
Size:
Color:
You're not doing anything wrong Marc. I'm using Google to perform content search on the forum as described in post #4 in
this thread.
Looking forward to seeing your code.
Size:
Color:
Thanks for the Google search help - this is essential for content searches on the forum site. This is what I was missing.
I think I've found the problem. When the value parameter to DrawLine is 0.0, the line does not appear and subsequently, the Drawing Tools do not work. A simple check for if (value > 0.0) before the call to DrawLine eliminates the problem.
Size:
Color:
Glad that you've found the solution. Nonetheless, I'm unable to reproduce it in neither linear nor semi-log chart mode:
CODE:
Please log in to see this code.
Size:
Color:
Try a horizontal line, i.e. both values are 0.
Size:
Color:
Makes no difference.
Size:
Color:
The problem occurred with semi-log scale. I prior post
http://www.wealth-lab.com/Forum/Posts/S-amp-C-2013-07-The-Step-Candle-Pattern-Vervoort-33342 described the issue of 0.0 on a semi-log scale (log(0.0) = -infinity).
The code line is as follows: level is a double, which when equal to 0.0 causes a problem. This code line is inside a strategy specific PlotLine function with level as a parameter.
CODE:
Please log in to see this code.
thinkscript.Pane == PricePane, BarNum.Bar > 0, color is one of Color enums, linestyle is one of LineStyle enums, and 0 < width < 5.
It would be helpful for others if an exception were thrown if any of the cosmetic chart function like DrawLine don't like a value. As it is now, WLP is silent apart from the overly general "overflow error" in the WLP.log file.
I'm considering policing the strategy specific PlotLine parameters based on the LogScale property of the ChartPane object.
Size:
Color: