- ago
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”)


0
1,005
7 Replies

Reply

Bookmark

Sort
Glitch8
 ( 10.10% )
- ago
#1
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?
0
- ago
#2
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.
0
- ago
#3
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.
0
Glitch8
 ( 10.10% )
- ago
#4
Well, line 88 is the line that triggered the error, so I would focus there.
1
Glitch8
 ( 10.10% )
- ago
#5
If you want to email us the complete strategy we could also help troubleshoot more thoroughly.
0
- ago
#6
Our support email is support@wealth-lab.com, just in case.
1
- ago
#7
Thank you.
0

Reply

Bookmark

Sort