Random Error -1: nil

Moderator: admin

Random Error -1: nil

Postby shortbutlucky » Thu Oct 06, 2016 5:20 pm

Hey All,

Attached is a strategy I developed, but I seem to get an error that I can't track down. Typically, an error will point to a line in the code, obviously, but this error just outputs, "-1". For example:

C:/Program Files (x86)/Candleworks/FXTS2/Strategies/Custom/TMACS v1.lua:-1: nil

It only works with certain parameters, so a typical optimization cycle is scattered with random nil errors. What's more annoying, is I can't seem to duplicate the error when backtesting in Indicore. Super weird.

Any ideas would be greatly appreciated.
Attachments
TMACS v1.lua
TMA Cross With Trade Checking
(37.65 KiB) Downloaded 874 times
shortbutlucky
 
Posts: 8
Joined: Thu Jul 07, 2016 11:24 am


Re: Random Error -1: nil

Postby shortbutlucky » Fri Oct 07, 2016 11:22 am

You're the man. Donated $20
shortbutlucky
 
Posts: 8
Joined: Thu Jul 07, 2016 11:24 am

Re: Random Error -1: nil

Postby shortbutlucky » Fri Oct 07, 2016 12:14 pm

Almost actually,

It appears there's still one random error. =/ How did you fix the major one? Either way, attached is a screenshot. This looks much better than it used to for sure.

Regards,
Robby
shortbutlucky
 
Posts: 8
Joined: Thu Jul 07, 2016 11:24 am

Re: Random Error -1: nil

Postby shortbutlucky » Fri Oct 07, 2016 12:31 pm

Added error causing settings and log for added reference. (sorry for reply spam, need approval for post, so can't edit)
Attachments
TMACS v2 Backtest Error.PNG
shortbutlucky
 
Posts: 8
Joined: Thu Jul 07, 2016 11:24 am

Re: Random Error -1: nil

Postby Apprentice » Wed Oct 12, 2016 3:02 am

For debugging.
Can you provide more information.
Testing method (Live / Demo/ Backtester/ Simulator).

For me, it would be easier to write a new strategy.
Can you at least describe your trading ideas.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 5 guests