3rd Party Function slowing backtest in Portfolio Backtest?

Questions about MultiCharts and user contributed studies.
Aston01
Posts: 21
Joined: 24 Oct 2013

3rd Party Function slowing backtest in Portfolio Backtest?

Postby Aston01 » 25 Oct 2013

I have been using the tradition average function in a strategy during back testing and recently opted for a Jurik MA to calculate that single value. With just that one change alone my back testing times went from 15-20sec to 6-8min. Is there something going on here that I am not aware of that would cause such a disparity?

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: 3rd Party Function slowing backtest in Portfolio Backtes

Postby ABC » 27 Oct 2013

Aston01,

in my opinion this can be caused various reasons, in your example it's probably the time it takes the DLL to receive the values, calculatate the result and for MC to get the result that simply adds up.
You can do a quick check with an indicator. Call the simple average function and stop the time it needs to calculate (using ComputerDateTime once at the beginning at when the calculation is done and then build the difference). Then do the same with the JMA.
If there already is a noticeable difference this will add up with every optimization iteration.

Regards,
ABC

Aston01
Posts: 21
Joined: 24 Oct 2013

Re: 3rd Party Function slowing backtest in Portfolio Backtes

Postby Aston01 » 28 Oct 2013

Thanks ABC,

Any idea how I can get the output value down to micro seconds? Currently just using ComputerDateTime I receive the same values in the print statement.

Code: Select all

If Condition1 then begin
Value25= ComputerDateTime();
JMA = JRC.JMA.reset.2k( Close of Data2, length, phase, condition1);
Value26= ComputerDateTime();
end;
41575.56 & 41575.56

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: 3rd Party Function slowing backtest in Portfolio Backtes

Postby ABC » 28 Oct 2013

Aston1,

you are welcome. DateTimeToString_Ms might help you. MilliSecondsFromDateTime and SecondsFromDateTime should also work.

Regards,
ABC


Return to “MultiCharts”