I got the error below which tied to a typical trade statement like the one below. The error goes away when the trade statement is commented out. When search on the web, it refers the error as a parsing error - trying to parse an integer when there’s no valid integer presence. This is not making sense with a simple trade statement. Thanks for any suggestions on what the error might mean..
CODE:
PlaceTrade(bars, TransactionType.Buy, OrderType.Limit, trigger_price, “label”)
Rename
Check line 88 in your code. Is it the PlaceTrade call? Or did the placing of the trade open up some logic path that caused a different statement to generate this error?
Use WriteToDebugLog on CFRX stock to output the the "trigger_price" which is passed on to PlaceTrade in line 88. Since an OverflowException is thrown, most likely the wrong value is too big e.g. Double.MaxValue or something.
Thanks Glitch and Eugene.
Line 88 is a Gaussian indicator statement and it is verified that the statement is syntax wise correct and is working.
I commented out everything and the error still exist and the error only goes away when the PlaceTrade() statement is commented out.
I thought that too that the trigger value in the Placetrade() might be a NaN and replace it with a constant but the error still exist.
There are many symbols in the data set that got the error message “input string was not in the correct format” not just the symbol, CRFX. I did not include all the symbol error message because it won’t let me attach a large image on a mobile phone. Thanks.
Line 88 is a Gaussian indicator statement and it is verified that the statement is syntax wise correct and is working.
I commented out everything and the error still exist and the error only goes away when the PlaceTrade() statement is commented out.
I thought that too that the trigger value in the Placetrade() might be a NaN and replace it with a constant but the error still exist.
There are many symbols in the data set that got the error message “input string was not in the correct format” not just the symbol, CRFX. I did not include all the symbol error message because it won’t let me attach a large image on a mobile phone. Thanks.
Well, line 88 is the line that triggered the error, so I would focus there.
If you want to email us the complete strategy we could also help troubleshoot more thoroughly.
Our support email is support@wealth-lab.com, just in case.
Thank you.
Your Response
Post
Edit Post
Login is required