FXCM Forex Trading

Error

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Error

Postby sho-me-pips » Tue Dec 13, 2016 2:31 pm

I get this error. Here is the error and function below. Causes the strategy to stop, was working good last time I used this.

C:/Program Files (x86)/Candleworks/FXTS2/Strategies/Custom/XXXXXXXX.lua:449: bad argument #2 to '?' (no value) 12/13/2016 13:36:44

function ExtTrace(message)
local theDate = core.dateToTable(core.host:execute("convertTime", 1, 4, math.max(instance.bid:date(instance.bid:size() - 1), instance.ask:date(instance.ask:size() - 1))));
Line 449--core.host:trace(string.format("%d/%02d/%02d %02d:%02d:%02d ", theDate.year, theDate.month, theDate.day, theDate.hour, theDate.min, theDate.sec) .. " " .. message);
end
"A hundred pips a day keeps the collector away"
User avatar
sho-me-pips
 
Posts: 82
Joined: Sat Sep 11, 2010 8:38 am

Re: Error

Postby Apprentice » Sun Dec 18, 2016 11:56 am

Can you provide strategy code?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 16949
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Error

Postby sho-me-pips » Sun Dec 18, 2016 12:17 pm

Thank you Apprentice for replying.

I should have re-posted that I located the problem in the code.
"A hundred pips a day keeps the collector away"
User avatar
sho-me-pips
 
Posts: 82
Joined: Sat Sep 11, 2010 8:38 am


Return to Discussions

Who is online

Users browsing this forum: No registered users and 1 guest