Issue backtesting with Bar magnifier enabled

Questions about MultiCharts .NET and user contributed studies.
champski
Posts: 71
Joined: 28 Jun 2011
Has thanked: 20 times
Been thanked: 1 time

Issue backtesting with Bar magnifier enabled

Postby champski » 09 Apr 2013

Hi,

I just discovered I'm no longer able to perform a backtest using bar magnifier (tick) (ascii data). It doesn't matter if I choose Classic or Extended mode with bar magnifier enabled, neither combinations work. All I see at the top of the screen is the status "calculating". I also notice my CPU maxes-out and stays that way until I cancel the backtest.
Two weeks ago I upgraded to MC 8.5 and this is the first time since then that I've tried a backtest, so I'm not sure if the upgrade is the cause or not.

To no evail;
- I've tried re-importing the tick data into Quote Manager
- deleted C:\Users\%username%\AppData\Local\TS Support
- Uninstalled and reinstalled MC 8.5

Please help.

Regards
Champski

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Issue backtesting with Bar magnifier enabled

Postby Henry MultiСharts » 09 Apr 2013

Hello Champski,
All I see at the top of the screen is the status "calculating".
Most probably your MaxBarsBack value is higher than the amount of bars you have on the chart.
Please go to MultiCharts->Format->Strategy properties->Properties->Maximum number of bars the study will reference to check it.

champski
Posts: 71
Joined: 28 Jun 2011
Has thanked: 20 times
Been thanked: 1 time

Re: Issue backtesting with Bar magnifier enabled

Postby champski » 10 Apr 2013

Hi Henry,

My max bars back setting is set to 10 and the chart goes back 2 months.

Any other ideas?

kenlionheart
Posts: 3
Joined: 10 Apr 2013

Re: Issue backtesting with Bar magnifier enabled

Postby kenlionheart » 10 Apr 2013

I'm testing on 200 days of data - but the test only does 1 day worth of back testing!

I have set the max bars ref will study at 9500 - because at 10'000 it says not enough bars.

Can I not just set the max bars ref will study at 100'000 and it would do the test for whatever data is available (under 100k bars) ? Why does it bring up "not enough bars" ?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Issue backtesting with Bar magnifier enabled

Postby Henry MultiСharts » 10 Apr 2013

Hi Henry,
My max bars back setting is set to 10 and the chart goes back 2 months.
Any other ideas?
Champski, are you able to plot this (tick) data series on a separate chart?
Is your strategy calculated ok with Bar Magnifier=Off?
Are you able to get any prebuilt strategy calculated on this chart with BM=On?
Have you tried to wait until the CPU load is back to normal-does strategy ever gets calculated?
Are you using a dll in your strategy?
You can use IOutput.WriteLine Method to trace what your strategy does at the moment.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Issue backtesting with Bar magnifier enabled

Postby Henry MultiСharts » 10 Apr 2013

I'm testing on 200 days of data - but the test only does 1 day worth of back testing!

I have set the max bars ref will study at 9500 - because at 10'000 it says not enough bars.

Can I not just set the max bars ref will study at 100'000 and it would do the test for whatever data is available (under 100k bars) ? Why does it bring up "not enough bars" ?
kenlionheart, the minimum MaxBarsBack is the largest MaxBarsBack required by all signals applied to the chart.
MaxBarsBack is the amount of bars that would be used for initial script calcualtion, to get the initial value of functions, variables. This amount of bars would be skipped, so you will see a first signal on maxbarsback+1 bar (for ex, may vary depending on the strategy). Chart data range should be higher than MaxBarsBack value. For example Average of 10 bars would require a setting of 10.
If your MaxBarsBack value is not enough the study would not be calculated and will show an error message.
If your MaxBarsBack is too high ( more than the amount of bars on your chart) then the study will be waiting for the required amount of bars. On the chart you can see "Strategy Calculating" message in such case.

champski
Posts: 71
Joined: 28 Jun 2011
Has thanked: 20 times
Been thanked: 1 time

Re: Issue backtesting with Bar magnifier enabled

Postby champski » 11 Apr 2013

Henry,

I've done some further testing and I need to correct something that I originally wrote.... I said..
"It doesn't matter if I choose Classic or Extended mode with bar magnifier enabled, neither combinations work. "....
After a closer look, I noticed I CAN in fact get bar magnifier working in Classic mode (with bar magnifier). It's Extended Mode (ASK and BID) with bar magnifier which does not work.
Now to answer your questions.....

Q-Is your strategy calculated ok with Bar Magnifier=Off?
A-Yes

Q-Are you able to get any prebuilt strategy calculated on this chart with BM=On?
A-Yes, only in Classic mode though.

Q-Have you tried to wait until the CPU load is back to normal-does strategy ever gets calculated?
A- I've waited 20 minutes at least, when it should take 30 seconds maximum (with only 1 month on the chart). No luck.

Q-Are you using a dll in your strategy?
A-No

Is the IOutput.WriteLine Method able to be used with NON-.Net MC? If so how?

I've tried creating a new windows user account and setting up MC as the new user but I get the same issue....

Also note that I've tried re-importing the tick data into Quote Manager (data which is actually an export of data previously imported by an earlier version of MC)

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Issue backtesting with Bar magnifier enabled

Postby Henry MultiСharts » 11 Apr 2013

Champski, what is your version and build number of MultiCharts (Help tab->About) ?

If you are using MultiCharts with PowerLanguage you can use Print statement for debugging.

Please send me the following information for further investigation (support@multicharts.com):
- workspace you are using
- in QuoteManager select the symbols you are using, make a right click on it->Export data->Export instrument. Send me the Qmd export file for analysis.
- in Power Language editor->File->Export->export with dependent functions the studies you are using the workspaces you are providing. Send me the study export file.

If the file size is >10 mb please use any file sharing hosting to upload the file and send me the download link.

You can also come to our live chat Monday-Friday 6:30 am - 4 pm EST to demonstrate the issue remotely and we will collect all required for analysis information. We will do our best to help you.


Return to “MultiCharts .NET”