Jump to content
Medved Trader Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About elfabre

  • Rank
  1. Jerry, Tx for the hint! I elaborated a little further on it and the following recipe came out: TO LET MT KNOW ABOUT MY SHORT POSITION, I do the following 5 steps: 1) Add a line with the shorted symbol to your portfolio and enter the amount of shares shorted as negative number 2) On the same line, I enter the commission/fees as a positive (not an attempting negative) number. 3) Add a second line just after the first one with the symbol "$CASH" and put in the "Quantity" column the positive amount you received from the broker (the short sale profit MINUS the commission/fees). 4) Add a third line just after the second one with the symbol "$CASH" and put in the "Quantity" column the amount of money you want to commit to satisfy the broker margin requirement. For instance, I like to be on the super-safe side and I usually reserve (not available for future investment) an amount of cash equal to the short sale profit plus the commission/fees. Hint: this is the same amount of the previous $CASH line plus twice the commission/fees. 5) Add a fourth line just after the third one with the symbol "---" (Sub-total) Today, I actually created the dumb investor portfolio of $10000 half invested in SPY long and the other half in shorting SPY (this time, with a huge and intentional $1000 of commission and $200 buy/sell price). See the picture and notice the following: A)) The short position is listed first and takes the first 4 lines. Then comes the single long position with an additional sub-total line (automatically added by MT, not really needed, but nice if you got more long positions, so you got the long sub-totals). In this particular portfolio I have no cash left for future investments (margin requirement cash is already accounted for on the third line), but in case, after the long position I add another "$CASH" line (which unfortunately comes with an additional useless sub-total). B)) The Value on the short sub-total line $3850 is OK; that is exactly the cash I am left with if I cover my short position immediately. And the $6150 on the long sub-total line is also OK; that is exactly the cash I am left with if I liquidate my long position immediately. Regardless whether SPY goes UP or down, given my dumb investment, I gain/lose anything, so my portfolio value is still $10000 as correctly reported on the last line (TOTAL) column "Value". This is actually the main reason prompting all this recipe; getting the Portfolio values right so at any give time I know exactly how much money I got. C)) SPY went up, from $200 to $246, a 23% gain, so I lost $1150 in the short and gained $1150. Focusing on the long position line, the column "Gain $" reports $150, the net gain once the commission/fees cost is accounted for ($150=$1150-$1000), whereas the column "Gain %" reports %23.01 the gain percentage NOT accounting for the commission/fees (23=1150/5000*100). "Gain $" and "Gain %" are not the same 'thing' seen from different point of view as expected, but their nature is quite different; questionable. IMHO "Gain $" should simply report $1150. The long position "Gain %" on the sub-total (2.5%) is actually correct and is the gain percentage this time accounting for the commission/fees (2.5=(($1150-$1000)/($5000+$1000))*100). Ideally, I expect the "Gain" on the stock position itself reporting the gain/loss related to stock price variation only (commission/fees playing no role). The "Gain" on the sub-total should focus on the money gain/loss, including commission/fees. D)) The short position "Gain %" on the sub-total (-3,76%) is meaningless. This is due to the fact that value of "T.Cost" column on the long position ($6000) is correct whereas the "T.Cost" column on the short position (-$6000) is not; on a short sale I receive from the broker the stock sale cash ($5000) minus the the commission ($1000), thus it should be (-$4000). In this case the "T.Cost" on the sub-total becomes $6000 instead of $4000 and Gain% becomes -2.5% (which is correct) instead of -3.76%. You may think to correct this by introducing the commission/fees on the short position as a negative number (step number 2); it works for "T.Cost" but doing so screws up the more valuable "Gain $". This shows that merely hacking with minus signs may not be enough to correctly specify short positions. E)) In summary, short position are actually submitted as four lines opposed to the long position which require only one line (and this was the gist of the initial question). However, this is not too bad since the essential info for the short position (with the exception of the wrong "Gain %") are nicely reported on the sub-total line which actually can be super-nicely collapsed, reducing the short position, indeed, to a single line. Too bad that the label "Sub-Total:" on the line itself cannot be renamed to something more appropriate ("SPY short" for instance). It would love to see other recipes on how to handle the shorts. fabrizio
  2. Hi Jerry! Is there any way (a flag maybe ?) to let MT explicitly know that a position in a portfolio is a SHORT (opposed to a LONG) other than resorting to the hack/trick of put a negative amount of shares? It seems that I am not able to find it. I am more than happy to use that trick but unfortunately, doing that, it screws up the total value of my portfolio. For instance, I am stupid investor with $10000, and I just created a new portfolio in MT with a long position on SPY of $5000 and a short position on SPY of $5000 as well. My money is fully invested and my two investments are worth globally $10000. As matter of fact, I can actually liquidate my two positions immediately and get $10000 in cash (no trading fees ;-). But MT portfolio shows a total of $0 on the column "Value" ( actually it shows a "-"); $5000 first line and -$5000 second line: Total $0. IMHO, the second line is wrong; it should report $5000 (not -$5000); that is the value of my SHORT position in case I liquidate it immediately. $5000 (first line) + $5000 (second line) = $10000 that is right the total value of my portfolio. And is not just an issue of minus signs. It is problem of numbers, too. If SPY goes up and the long position gains a dollar (conversely, lost $1 in the short position) it should be reported: $5001 (first line) + $4999 (second line) = $10000 but MT portfolio likely would report: $5001 (first line) - $5001 (second line) = - Also the column "T.Cost" is questionable; I paid $5000 to open the Short position not -$5000! And the Total cost of the two investments is $5000 (first line) + $5000 (second line)= $10000, not $0 (actually "-") as reported by MT Portfolio (Total on the "T.Cost" column). It could be a bug (grabbed unstable version last week) but I cannot believe nobody noticed this so far. So, I am assuming it is just me not understanding how to handle Shorts properly on the MT Portfolio or how to interpret the "Value" and "T. cost" columns. Help, what am I missing ? Fabrizio
  3. Jerry, I mailed my configurations with some pictures. Thx for the exahustive explainations. Fabrizio
  4. Hedging the edge ...

  5. It may be just me, but I got some troubles in setting the number of decimals after the point. I simply changed the default format string (Setting->General->Date & Numeric format) #,###,###,##0.00## to this one: #,###,###,##0.00 Generally, it did work for the Portfolio, reducing the decimals to only 2, but not in the Sub-totals! More puzzling to me appeared the option in (Setting->Apperance->Other) named "Decimal Alignment-# of integer Digits"; what is that supposed for ? All I know is that, when I changed it to 2, it fixed the Sub-totals decimals, too. Why so? Is this option conflicting/repetition with the previous one? Since I was there, I also clicked the option named "Omit +/- in Coloured cells". Again, it did work in general, but got Sub-totals wrong; it removed the "-", but the negative Sub-total cells are not red coloured! So, how do I know if a total is positive or negative? (QT just leaves sign on subtotals). The switch named "Color Sub-Totals Same as Symbols" seems to have the effect to turn off/on (pls, note the off/on order) italic on Sub-Totals AND column titles fonts (rather than changing Sub-Totals colour according to Market Symbols). The following switch "BOLD Sub-Totals" seems to turn on/off bold font on Sub-Totals AND column titles. It is just my environment (italian culture on italian Windows XP SP3, Visual Style: Office 2010 Blue, Default Color Set:"Easy", Portfolio Color Set:"Sunny") or anybody else can reproduce it? Finally, I selected "Bold this column" on the Symbol Column in the Portfolio window. Now, I got Bold font Symbols, but all symbols are also CENTERED! and there is no way back (aside from closing and reopening the Portfolio). The column "Change $" is right justified but the Sub-total line is left justified (not so in QT!). What about all the prices on columns like Bid/Last/Ask/High/etc.? They appear justified on the left so they get the decinal points all misaligned (but you also get smaller column width). The venerable QT apparently used a special justification which gets all the decimal points magically aligned AND left justified ! Yours, fabrizio
  6. Yep, you got it! Can load old QT portfolios both from port.xml and *.pex files no prob and with the PAID column right. Kudos. fabrizio
  7. 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 P.S. Stiil, it would be nice to import the *.pex files directly since, along my trading years with QT, I collected dozens of them!
  8. 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: ---- BEGIN OF ERROR MESSAGE 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 ************** mscorlib 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 ---------------------------------------- MT Versione assembly: Versione Win32: 1.0.7999.1138 Base di codice: file:///C:/Programmi/Medved%20Trader/MT.exe ----------------------------------------
  9. 3 BIG Thanks FIRST I have been using QuoteTracker since the time it was a free program in the early stage of development and debugging. The fact that was free, there was an Italian translation and the program looked with a clean interface, full featured and stable even in the early days, immediately grabbed my attention (I am an italian software engineer myself). Then, it came the time when was promoted/offered/adopted by MB Trading, and that's when I decided to open an account with them and get my hands dirty! THANK YOU Mr. Medved, for providing me the tool to get in the stock trading world! SECOND Nowdays, I completely switched to Linux and... surprise !!! QuoteTracker is the only tool that still works under wine/Linux no problem. MBTrading tools won't work under Wine/Linux, not even the WEB interface (requires MS Silverlight). THANK YOU Mr. Medved, for providing me the way to trade on a free OS (saving MS fees). THIRD I want to point out that, since MB Trading does not offer free quotes anymore (unless u pay 25$/month of commision otherwise it's 7.5$ / month), by using QuoteTracker, I am still able to see free TD Ameritrade feeds and trade on MBTrading without MB Trading feeds subscription (something that I won't be able to do even by switching back to MS Windows and using MBTrading tools). THANK YOU Mr. Medved, for providing me a $7.5 / month saving. Hint: Since QuoteTracker 3.9.8a (qtfix on 3.9.8 and an old mbt.trd file grabbed from a 3.9.7) was still working with MB Trading (Dec 2013) I guess that the MBT API has not changed much along the years. Pls, send me the beta preview. Any way I can help with the MB Trading API (testing, coding)? Fabrizio
  10. elfabre

    MT Testing

  • Create New...