MultiCharts Easter Sale has jumped in! Up to 50% off Explore offers
+1 888 340 6572
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
bug_report_small.png
Open Bug report MC-1788

Multiple calls per bar in Portfolio Trader

action_vote_minus_faded.png
1
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

When backtesting in Portfolio Trader with daily data from Free Quotes, my PMM signal is called multiple times for some bars... and not at all for other bars. I am not aware of any workaround, which makes this a critical bug regarding the usability of Portfolio Trader.

I have discussed this issue on the forum, subject "Portfolio Trader: MM Signal called multiple times per bar?":

http://www.multicharts.com/discussion/viewtopic.php?f=1&t=47457&p=109981#p109981

Steps to reproduce this issue

I have attached a project containing:
* two portfolio workspaces
* a trading signal
* a PMM signal
* some (partial) logs with the output I am seeing

Comments (8)
#0
user-offline.png  MultiCharts Support (MultiCharts)
Oct 30, 2014 - 17:50

Please go to QuoteManager and check if the 10/22/2014 is there for both symbols.

#0
user-offline.png  fbertram (fbertram)
Oct 31, 2014 - 01:55

Dear development team,
thanks for following up on this. I can confirm that this issue is somehow related to data. However, I am not exactly sure how. There is something still funky here.
Experiment #1
* went into project _Bug2.pws with just 2 stocks
* convinced myself that the issue was still there
* went to quote manager and noticed an issue on 10/22
* deleted all data in quote manager and cleared cache
* closed all apps
* restarted portfolio manager and power language editor
* convinved myself that the issue was still there
* somehow, the issue disappeared later on - but I have no clue why and when
So I went on to try with the larger setup (see files I attached):
Experiment #2
* loaded workspace _Bug.pws, including 10 stocks
* convinced myself there is still an issue pretty much every other day
* closed all apps
* went into quote manager and noticed that data are messed up
* deleted all data and cleared cache, exit quote manager
* reopen portfolio workspace and power language editor
* reran backtesting - which will now reload all data
* issue is still there
* went to quote manager and verified that data are now OK for the last week (where I saw issues)
* closed and re-opened portfolio manager and editor
* reran backtesting - issue is still there
* rebooted PC
* restarted portfolio trader. received message: application terminated incorrectly, or MultiCharts account is already connected on a different machine. Do you want to terminate the other session and complete authorization? clicked yes and continued
* reran backtesting - issue is still there
* I guess I am missing the step that fixed things in experiment #1. I would agree that at the root there is something with the data, but fixing the data alone does not solve the issue.
I am curious if the issue will be gone tomorrow - but this leaves me with feeling I can't trust the setup. I am concerned that FreeQuotes is having lots of difficulties loading the data correctly. I am concerned that portfolio trader is not dealing with that situation well - the fact that it will call the same bar twice if data are missing is still a critical bug. It should produce a warning and do something reasonable here. And, I am concerned that there seems to be some caching mechanism that is hard to understand and keeps the issue around, even after the data are repaired.
Thank you,
best regards, Felix

#0
user-offline.png  fbertram (fbertram)
Oct 31, 2014 - 02:20

I attached an export of my relevant data. The data look clean to me... at least from 10/22 to 10/30. Still, I am seeing the issue. Hope this helps.

#0
user-offline.png  fbertram (fbertram)
Nov 02, 2014 - 20:40

Dear support team,
I have tried everything I can think of including deleting all data and re-downloading, reducing the look back, removing stocks one by one. I am unable to resolve this issue. While it might originally be caused by faulty data, it can't be fixed by deleting the data, clearing the cache and rebooting the machine.
Please help - I am stuck here and can't continue development until this is resolved.
Thank you,
best regards, Felix

#0
user-offline.png  MultiCharts Support (MultiCharts)
Nov 05, 2014 - 13:44

Could you send us the following files to support@multicharts.com?
1. The portfolio workspace to reproduce the situation.
1. Export of used symbols (with data) from QuoteManager in .qmd archive: http://www.multicharts.com/trading-software/index.php/Exporting_Data  
1. The exported scripts with all dependant functions that are used on the workspace: http://www.multicharts.com/trading-software/index.php/Importing_and_Exporting_Studies

#0
user-offline.png  fbertram (fbertram)
Nov 06, 2014 - 02:40

Hi Andrew,
I have sent an email with the requested data to support@multicharts.com. Please let me know if there is anything else I can provide.
Thank you,
best regards, Felix

#0
user-offline.png  MultiCharts Support (MultiCharts)
Nov 07, 2014 - 12:42

As mentioned above, the case occur when bars have different closing time. By "different closing time" i mean exactly the time of close of bars in Edit Data window in QuoteManager.
Here are the steps after which the issue will be fixed:
1. Open QuoteManager.
1. Select all the symbols you use in Portfolio Trader with your left mouse click and pressed CTRL key.
1. Make a right-click on any of the selected --> Edit Symbol...
1. In the opened Multiple Symbols Editing window on the Settings tab please select use Exchange & ECN's Settings --> select any exhcnage you want (for example NASDAQ).
1. On the Sessions tab of the same window please make sure the Use Exchange & ECN's Sessions is selected.
1. Close MultiCharts and all its parts. Make sure all MC processes are ended in Windows Task Manager. Here you can find the list of all MC processes: http://www.multicharts.com/trading-software/index.php/MultiCharts_Processes
1. Open only MultiCharts.
1. Create daily charts (going back as far as you selected it in Portfolio Trader) for each of the symbols used in Portfolio Trader (those you modified in QuoteManager).
1. One-by-one select each of the charts and press CTRL+R to reload data for every symbol.
1. As soon as the reloading of data is over, all bars should have identical closing time and now if you calculate your strategy in Portfolio Trader, the PMM signal should be calculated only once per each date (on daily bars).

#0
user-offline.png  fbertram (fbertram)
Nov 13, 2014 - 08:27

Hi Andrew,
thank you for your detailed feedback and apologies for my slow response. I have been able to work around the issue following the steps you have given. However, I disagree with your assessment that this is not a bug. Instead, I see two issues in adjacent areas:
1) if the Portfolio Manager can't handle this situation in a meaningful way, it should display an error message and stop operation. You might say this is a feature request, I'd consider it a bug in Portfolio Trader.
2) I did not set up the slightly weird session settings for NASDAQ. Instead, they were either pre-installed by MultiCharts, or somehow generated on the fly. As these settings lead to a situation under which Portfolio Trader doesn't work, I'd consider this a bug.
Thank you,
best regards, Felix

History
Issue basics
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (2)
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Reproducability
    Not determined
  • Severity
    Critical
Attachments (2)
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates