Jump to content
Medved Trader Forums

Portafolio import (suprised 5 times :-)


Recommended Posts

Thanks Jerry for providing a great program, with nifty features even at this early stage. Your programs keep "surprising" me (in a good way, do not get me wrong!).

Yesterday, I updated to the latest MT 1.0.7999.1138 (Windows XP SP3).
Playing a little with it, I noticed a nifty feature, that escaped my attention before:

I can import Portfolios:-)
So I decided, at least for the day, to stop using the old QT and try to do as much as I could with MT,  to have some more fun.

I work with 27 Portfolios in QT (I must admit, practically they are Watch-lists rather than real Portfolios). I really did not want to re-create them all in MT, one by one! So I went to the QT and, sure enough, there is a specific procedure to export all portfolios that I need. QT created a nice *.pex file. Then, I opened MT and:

1) Surprise ! I was sure that I saw the day before a way to import Portfolios; today I just could not find it! Is not in the MT Dashboard drop-down menu tagged indeed "Portfolios". Neither it is in the "Medved Trader Portfolios" window that opens when you click on the "Edit Portfolios" button on the Dashboard. This is probably the right place to be in. As matter of fact, here I find Add, Delete and Copy buttons but no Import (or maybe Export) button! After walking around for 15 minutes, I found it in a not so expected spot: it is in the drop down menu in the Dashboard called "Files". Please, do note that this menu "Files" has entries to load and save Layouts and Clear Data, then there are also Export/Import entries, but it does not suggest what is actually Exported/Imported, no reference to Portfolio at all. So, for 15 minutes, I wrongly assumed they are there to import Data or maybe Layouts; far from me the idea that we here are talking about Portfolios! Happy about the discovery, I moved on with the import procedure.

2) Surprise ! Even if I selected as Filetype the "Old QT Portfolios" MT does not see the *.pex. If I force it, by selecting All Files, MT loads it but does not see any Portfolio: it does not work. Apparently, MT tries to load a Port.xml file, which, even if I do not know for sure, I suspect being a QT internal file that has something to do with Portfolios. Browsing the old QT installation directories I found this Port.xml file, indeed.

3) Surprise! MT loaded this file and offered to import all the Portfolios that I have in QT (no just the ones that I exported in the *.pex file). OK, never mind, I am happy anyway since MT offers to select which Portfolio to import.

4) Surprise !  When later I tried to open these imported Portfolios, many, but not all, did not open. The Portfolio window has a big red cross in it instead of the symbol list, and an Error Box pops up saying "OwnerDrawCellEventArgs has null Style" with a button which promises more details (see below).

5) Surprise! Once I close the Error box and the Portfolios windows (with a big red cross) and I open the Portfolio again, it works correctly (from the second time on)! ALELULIA.

I can e-mail you the Port.xml file in case you need it. The details of the pop up error box are below, cheers, fabrizio:




Le informazioni su come richiamare il debug JIT (Just-In-Time) anziché questa finestra
sono riportate in fondo al messaggio.

************** Testo dell'eccezione **************
System.NullReferenceException: OwnerDrawCellEventArgs has null Style.
   in C1.Win.C1FlexGrid.OwnerDrawCellEventArgs.a()
   in C1.Win.C1FlexGrid.C1FlexGridBase.a(Graphics A_0, Int32 A_1, Int32 A_2, Style A_3, Rectangle A_4, String A_5, Image A_6)
   in C1.Win.C1FlexGrid.C1FlexGridBase.a(Graphics A_0, Int32 A_1, Int32 A_2, Style A_3, Rectangle A_4, String A_5, Image A_6, CheckEnum A_7)
   in C1.Win.C1FlexGrid.C1FlexGridBase.DrawCell(PaintEventArgs e, Int32 row, Int32 col)
   in C1.Win.C1FlexGrid.C1FlexGrid.DrawCell(PaintEventArgs e, Int32 row, Int32 col)
   in C1.Win.C1FlexGrid.C1FlexGridBase.DrawRow(PaintEventArgs e, Int32 row)
   in C1.Win.C1FlexGrid.C1FlexGrid.DrawRow(PaintEventArgs e, Int32 row)
   in C1.Win.C1FlexGrid.C1FlexGridBase.a(PaintEventArgs A_0)
   in C1.Win.C1FlexGrid.C1FlexGridBase.OnPaint(PaintEventArgs e)
   in System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   in System.Windows.Forms.Control.WmPaint(Message& m)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Assembly caricati **************
    Versione assembly:
    Versione Win32: 4.0.30319.296 (RTMGDR.030319-2900)
    Base di codice: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    Versione assembly:
    Versione Win32: 1.0.7999.1138
    Base di codice: file:///C:/Programmi/Medved%20Trader/MT.exe

Link to comment
Share on other sites

I emailed you an update that I believe should fix the issue. Please let me know if you encounter any other problems.


Importing QT portfolios - it reads the files directly (PORT.XML). It does not look at any export file - user does not need to export anything first.

  • Like 1
Link to comment
Share on other sites

TX Jerry 4 the qk fix.

Almost there! Now it works fine, however I stumbled on 1 more "surprise".

In all the imported Portfolios, I get "Symbol", "Note" and "Quantity" right.

But the "Paid" column is always null (zero), even if PORT.XML did contain "Paid" datas.


With my best regards, fabrizio



Stiil, it would be nice to import the *.pex files directly since,

along my trading years with QT, I collected dozens of them!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...