After researching in MC threads I have tried increasing the maximum number of bars to 1500 but I still get the same error.
All my data is correct and I am loading thousands of bars while my max period on any parameter in the strategy is less than 200
Attachment YM_1H_mc_multTF.pla added
Attachment YM_1H_mc_multTF.sqx added
Attachment Screen Shot 2020-08-24 at 63705 PM.png added
What I can conclude so far whatever this value is related to is not the periods in the indicators of the strategies. In the errors in these screenshots, the max period used by an indicator in the strategy was over 100. Yet MultiCharts was looking for a value near 79.
Because I am getting a div by 0 error on some strategies, I can at least assume this value is used in a division function somewhere. Since its a different value for each strategy, it may be in the generated MC code and not relative to the main indicator logic of the strategies.
Attachment Screen Shot 2020-08-24 at 64528 PM.png added
But the value to make the strategy work is different for each one, and as explained above, does not exhibit the same behavior for each strategy when adjusting this parameter in MultiCharts.
Attachment Screen Shot 2020-08-24 at 65004 PM.png added
Attachment Screen Shot 2020-08-24 at 65154 PM.png added
Side note, Ichimoku seems to ignore the global indicator period max value. Most of my strategies using Ichimoku use periods of over 100.
https://www.multicharts.com/trading-software/index.php?title=Strategy_Properties
Based on the description, I believe some value in the generated final code is somehow affecting this value on every strategy and it does not appear to be a user error
Attachment Screen Shot 2020-09-01 at 95555 PM.png added
Attachment Screen Shot 2020-09-01 at 100305 PM.png added
Is it possible there is a variable MC is expecting to be a specific value for max number of bars and however this is calculated is incorrect?
Status changed from New to Fixed
I think your problem is that you don't have enough data for all the symbols used by strategy in your Multicharts.
The number of reserved bars needed by Multicharts depends on the strategy logic - mostly indicators periods.
I tried to test the attached strategy and 200 reserved bars are enough, but I had to make sure I have enough history for all symbols, otherwise it threw the error you posted.
Hope it helps
Best regards,
Tomas
Attachment image-0.png added
Is there a different way you are loading data into MultiCharts????
Please note that the number of reserved bars is applied BEFORE the start date of the backtest. So if 200 bars are enough for this strategy, you need to have data for your backtest date range + 200 bars before backtest start date.
Attachment Screen Shot 2020-09-10 at 52303 AM.png added
Attachment Screen Shot 2020-09-10 at 52225 AM.png added
Attachment Screen Shot 2020-09-10 at 52710 AM.png added
Attachment Screen Shot 2020-09-10 at 52942 AM.png added
Attachment Screen Shot 2020-09-10 at 52932 AM.png added
Attachment Screen Shot 2020-09-10 at 52923 AM.png added
Status changed from Fixed to In progress
Please upload the exact history data you use here: https://drive.google.com/drive/folders/1ab-xmLabmSqkUFO7ztQlTFoBhuqUPtpf?usp=sharing so I can reproduce it.
It looks like there's some problem with the data
I do not know where to import/export data directly to and from MultiCharts. I trained the strategies over your futures data but never imported any historical data into MC. Instead, I just connected MC to my Rithmic Data feed and whenever I change the number of bars to load, MC downloads the data from Rithmic on the fly. Is there a different process I should be following for data import into MC? My assumption was you didn't need to upload the entire 10+ years of data from SQX into MC because that data shouldn't be needed to trade the strategy. But if I am mistaken about this please let me know.
I will look into how to export data from MC. If you have any guides on this, that would help.
You can either export your history data and import it into SQX or export the data from SQX and import it into MC.
You can begin here: https://strategyquant.com/doc/strategyquant/reliable-backtesting-in-tradestation-multicharts/ and then go through our documentation and blog. You should find some relevant info there.
If you still struggle, you can contact our guys on support and they will help you.
I have sent emails into support and not heard back.
Attachment Screen Shot 2020-10-05 at 40733 PM.png added
So it took me forever but I finally figured this out. I was getting two errors that were unrelated. As for the max number of bars error, this is caused because of the Ichimoku Indicator and the periods associated with it. For some reason, MultiCharts adds these periods together. So if the Senkou Period is 150 and the KijunPeriod is 100, Multicharts will add these together and the max number of bars will be 250 instead of the max number of a given period which would be 150. Also I needed to make sure all subcharts loaded more bars than the value of the combined periods. I just set all charts to 1000 bars, set the max number of bars on each strategy to a value above the combined Ichimoku periods and everything worked.
The second error was the divide by 0 error. This is unrelated and actually has to do with a bug I posted here where SQX generates 0 values for parameters it shouldn't: https://roadmap.strategyquant.com/tasks/sq4_6900
In this case, my strategy had a profit target that was 5.5 x ATR(0) where the period of the ATR is 0. MultiCharts cannot accept a 0 value period of the ATR. This is definitely a bug because the range I set for developing strategies was between 5 and 50. The minimum was never 0. MultiCharts just gives the next error once the previous one is resolved which is why I thought this was related to the max bars back but it is not. Once I changed the ATR period from 0 to 1, the divide by 0 error disappeared and my strategy loaded up correctly
Status changed from In progress to Fixed
thanks for the info. I'm glad that you figured out where the problem was.
I'm closing this task and will take a look at the issue with zero period.
Best regards,
Tomas