New update give error in backtesting strategies

All posts which do not fit into any other sections of the forum.

Moderator: admin

New update give error in backtesting strategies

Postby Cactus » Mon Aug 22, 2016 9:29 pm

Ever since the new update (the one with simulation mode) when I try to backtest previous strategies it always throws an error "There is no Init() function" ... but still runs the backtest. Why is that and does it affect the performance in any way?

Code: Select all
Message   Time
Backtesting finished   22/08/2016 21:41:02
Stopped   22/08/2016 21:41:02
Backtesting started   22/08/2016 21:40:52
There is no Init() function   22/08/2016 21:40:42
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: New update give error in backtesting strategies

Postby Julia CJ » Wed Aug 24, 2016 1:58 am

Hi Cactus,

This issue appears due to uncorrect work of strategy, but it it does not affect anything.
Julia CJ
 

Re: New update give error in backtesting strategies

Postby Cactus » Wed Aug 24, 2016 10:01 pm

I see
I notice this is problematic since it won't allow for optimisation, gives this error:
Code: Select all
C:/Program Files (x86)/Candleworks/FXTS2/Indicators/Custom/JSONHelper.lua:-1: There is no Init() function   25/08/2016 03:12:22


This is a strategy generated by FxWizard and there is an init function... how to fix this?
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: New update give error in backtesting strategies

Postby Cactus » Wed Aug 24, 2016 10:20 pm

Can I change something in the strategy template in folder MarketscopeTemplates to achieve a fix?
Code: Select all
-----------------------------------------------------------
-- Standard strategy init handler for marketscope strategy
-----------------------------------------------------------
function Init()
    {$Init_PropertyDefinition$}
    strategy:type(core.Both);
   
    strategy.parameters:addString("Account", "Account", "", "");
    strategy.parameters:setFlag("Account", core.FLAG_ACCOUNT);
    {$Init_ParameterDefinition$}
end
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: New update give error in backtesting strategies

Postby Cactus » Thu Aug 25, 2016 1:16 am

Is it because of this before Init() ?

Code: Select all
local _gSubscription = {};
local _gUpdatePeriods = {};
local _gLastTime;   
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: New update give error in backtesting strategies

Postby Julia CJ » Thu Aug 25, 2016 7:39 am

Hi Cactus,

Apparently, the strategy is in the two files. This is the main reason why the backtester and optimizer do not work as you need. It is necessary to change the location of JSONHelper.lua, it should be out of Indicators/Custom folder.
To do it you should change the generation of the strategy, i.e. FX Strategy Wizard needs to be updated. This request will be added.
We can consider your strategy and try to fix it. Please send the strategy to e-mail: ycherepanova@gehtsoft.com.
Julia CJ
 

Re: New update give error in backtesting strategies

Postby Cactus » Thu Aug 25, 2016 9:41 am

I removed the JSONHelper.lua file and the problem is gone. The optimisation doesn't produce an error. But is still awfully slow with just 700 combinations. Might just be my computer, or an awful long strategy. Why didn't I think of that... I just realised what that file was. But I've no idea where it came from :shock: My strategy uses over 400 indicators it would be difficult for you to test it right away heh but I will send you something when I am finished ^^ thank you for your reply. An update to FX Wizard would be helpful however I learnt in fact it is best to start working with indicore directly of course. But still, FX Wizard saves a lot of time for me and makes for a nice template
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 11 guests