Portfolio Trader - Does not advance date to the current date

Questions about MultiCharts and user contributed studies.
hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Portfolio Trader - Does not advance date to the current date

Postby hughesfleming » 08 Mar 2018

If I leave Portfolio Trader on overnight connected to IB Gateway the date never advances to the current date and my positions don't execute. It always remains one day behind. If I stop and start Portfolio Trader before the open it will correctly use the current date and everything works. This means that I always have to be there to stop and start everyday for this to work.

What do I need to do to change the way this works so that it always opens the positions that it is supposed to? Today, I could not get back in time to do this stop/start business and sure enough Portfolio Trader is sitting there doing nothing.

Any suggestions?

Thanks,

Alex

User avatar
fbertram
Posts: 166
Joined: 16 Oct 2014
Location: Seattle, USA
Has thanked: 36 times
Been thanked: 76 times
Contact:

Re: Portfolio Trader - Does not advance date to the current date

Postby fbertram » 08 Mar 2018

I have automated my server:
* a schedule set in the BIOS starts the machine in the morning
* a script is triggered on Windows startup. This script launches IB TWS and Portfolio Trader, logs in, starts auto-trading. I have programmed this in AutoIT
* a script is triggered using Task Scheduler after close of session. This script stops auto-trading, closes Portfolio Trader and TWS. Again, this is programmed in AutoIT
* another script is triggered using Task Scheduler, to shut down the machine

Your issue might be somehow related to Interactive Broker's server maintenance at 11pm. I personally don't like the idea of letting the machine run 24/7 and believe reliability is improved by shutting everything down.

Cheers, Felix

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Portfolio Trader - Does not advance date to the current date

Postby hughesfleming » 08 Mar 2018

Hi Felix,

Thanks for your explanation. I do know how to use AutoIT so I will give it a go. I think how you are doing it is the best way. I also think PT should be able to manage this better. Often my strategy holds overnight and re-balances just after the open. I am not expecting to run this continuously but just Monday to Friday but that has not been possible without manual intervention.

regards,

Alex

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Portfolio Trader - Does not advance date to the current date

Postby Xyzzy » 10 Mar 2018

I'll second (or third) this request. I'm using Portfolio Trader to trade US stocks, ETFs and futures through Interactive Brokers. (With IQFeed as my data provider.)

I live on the West Coast of the US, which is three hours behind the New York trading hours (i.e., Pacific Time versus Eastern Time). My normal "hygiene" each evening before bed is to close every MultiCharts instance (including all Portfolio Trader instances). I'll then re-open the Portfolio Trader portfolios and turn on auto-trading. The strategies should then begin trading during regular trading hours the next morning, starting at 06:30 AM my time.

At least once a month, Portfolio Trader will fail. The portfolios will be open with auto-trading turned, but Portfolio Trader will not submit any orders to TWS the next day. This even occurs for super-simple scripts, such as an exit signal that is nothing more than "Sell next bar at XYZ limit." The scripts appear to be running correctly, but Portfolio Trader doesn't submit orders to TWS.

If I close Portfolio Trader, reopen the portfolio, and re-engage auto-trading, then the orders will then be submitted correctly. Since I'm not normally awake at 06:30, though, I typically won't discover this problem until several hours later, which can cause me to miss valid trades. This happened once again this morning.

This seemed like a random error that I couldn't pin down. However, the original poster seems to have identified the source of the problem. This is a serious problem for me... can you please fix? Thanks! :D

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Portfolio Trader - Does not advance date to the current date

Postby hughesfleming » 14 Mar 2018

Dear Multicharts....Today is the 14th. Portfolio Trader thinks it is the 13th. No trading again.

Is this ever going to be addressed? At least, when someone turns on Auto Trading, there should be a warning that the date setting does not match the system clock. This is needs to be fixed. Are we really just supposed to limit our trading to a 24 hour window?

Would someone please respond and recognize that there is a problem.

Thanks,

Alex
MC Date Problem.JPG
(23.26 KiB) Downloaded 1231 times

robz7575
Posts: 15
Joined: 17 Feb 2018
Has thanked: 1 time
Been thanked: 1 time

Re: Portfolio Trader - Does not advance date to the current date

Postby robz7575 » 15 Mar 2018

I have the same problem

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

Re: Portfolio Trader - Does not advance date to the current date

Postby Henry MultiСharts » 16 Mar 2018

Hi,

The Data Range settings of Portfolio do not limit your automated trading to the specified End date.
When "pin" is disabled - End Date is always the Current Date at the moment of opening this portfolio workspace. It will not auto advance while the portfolio is open.
When "pin" is enabled - End Date is the specified date that was saved in this portfolio workspace.
When you are already running the auto trading you cannot change the data range settings and you do not need that, as realtime data will be received and utilized for Portfolio Auto Trading without any additional actions and/or date limitations (if it is steamed by your data vendor).

robz7575
Posts: 15
Joined: 17 Feb 2018
Has thanked: 1 time
Been thanked: 1 time

Re: Portfolio Trader - Does not advance date to the current date

Postby robz7575 » 16 Mar 2018

Hi,

The Data Range settings of Portfolio do not limit your automated trading to the specified End date.
When "pin" is disabled - End Date is always the Current Date at the moment of opening this portfolio workspace. It will not auto advance while the portfolio is open.
When "pin" is enabled - End Date is the specified date that was saved in this portfolio workspace.
When you are already running the auto trading you cannot change the data range settings and you do not need that, as realtime data will be received and utilized for Portfolio Auto Trading without any additional actions and/or date limitations (if it is steamed by your data vendor).

What do you mean by pin?

User avatar
fbertram
Posts: 166
Joined: 16 Oct 2014
Location: Seattle, USA
Has thanked: 36 times
Been thanked: 76 times
Contact:

Re: Portfolio Trader - Does not advance date to the current date

Postby fbertram » 16 Mar 2018

the little thing that looks like a thumb tack.
PortfolioTrader_Pin.JPG
(26.37 KiB) Downloaded 1188 times
Cheers, Felix

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Portfolio Trader - Does not advance date to the current date

Postby hughesfleming » 21 Mar 2018

Dear Henry,

I am still testing but I loaded my workspace with the date unpinned and I had no trades today. The date displayed yesterdays date as you can see in the attachment. I had to stop and manually set the date to 21 (today) and it started to send orders to IB. As far as I am concerned the way Portfolio Trader manages dates is very error prone. I really hope that this is addressed in the next version of Multicharts to make it more robust.

I have started to write some scripts in AutoIT following Felix's advice to shutdown and restart Portfolio Trader at specific times with PT set to bring in any open trades from IB. It is a pity that this is even necessary.

Kind regards,

Alex
Unpinned.JPG
(20.92 KiB) Downloaded 1158 times

strelow

Re: Portfolio Trader - Does not advance date to the current date

Postby strelow » 21 Mar 2018

Hello Hug

I have same problem . Put your pc one day in the future than will works like today set date to 22th . Its not the best solution but works.
Regards

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Portfolio Trader - Does not advance date to the current date

Postby hughesfleming » 21 Mar 2018

Thanks Strelow. Good to know that works. Unfortunately, I have no choice but to keep the date correct.

regards,

Alex

Zheka
Posts: 223
Joined: 13 Jan 2016
Has thanked: 8 times
Been thanked: 53 times

Re: Portfolio Trader - Does not advance date to the current date

Postby Zheka » 22 Mar 2018

Alex,

But in the screenshot you attached the date is *pinned*, fixed.....No wonder you do not get trades.

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Portfolio Trader - Does not advance date to the current date

Postby hughesfleming » 22 Mar 2018

Hi Zheka,

Yes, that was not very clear on my part and a mistake. I have posted two screenshots, one pinned and one unpinned. The point I am trying to make is that is does not make any difference. Unless I manually update the date to the current date, Portfolio Trader does not enter trades.

The only time Portfolio Trader does work for me consistently is if I restart PT daily with my date settings set with a starting date and the current date. I have spent two years working on the mechanics of this strategy and my frustration levels are high.

regards,

Alex

User avatar
fbertram
Posts: 166
Joined: 16 Oct 2014
Location: Seattle, USA
Has thanked: 36 times
Been thanked: 76 times
Contact:

Re: Portfolio Trader - Does not advance date to the current date

Postby fbertram » 22 Mar 2018

Hi Alex,

I recommend you contact support directly. From my own experience over the past 18 months, I can tell you that since I switched to restarting my server every morning (instead of letting it run 24/7), everything is running rock solid. I do _not_ need to adjust the end date in portfolio trader ever.

Best regards, Felix

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Portfolio Trader - Does not advance date to the current date

Postby hughesfleming » 22 Mar 2018

Thanks Felix, I am in fact following your advice and using AutoIt to start PT before the open and shutdown after the close. This is a workable solution and to be honest, I am happy to stop posting about this.

Kind regards,

Alex

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Portfolio Trader - Does not advance date to the current date

Postby TJ » 22 Mar 2018

Where are you located?
What exchanges are you trading?

Does this have to do with your computer time being different than the exchange time?

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Portfolio Trader - Does not advance date to the current date

Postby hughesfleming » 22 Mar 2018

Hi TJ,

The dedicated server is colocated in Frankfurt and is set to US Eastern standard time. Clocks are synced every 5 minutes to prevent any drift in the system clock. That is something that has caught me out in the past so I watch out for that. I am trading US S&P100 stocks. A pretty straight forward setup. Overall Portfolio trader has worked very well and I don't use anything else these days. If anything goes wrong it comes down either a random disconnect with the data feed or the date issue. I do know how to work around the date problem but sometimes I miss it and that turns into a frantic rush to get the position opened. That is why Felix's suggestion to automate is a good one. It is a workaround for the occasional user error that happens when you are trying to do too many things at once.

regards,

Alex


Return to “MultiCharts”