Stockyard Windows The client portion of the program is built on top of the MFC framework. I used quite a few of the standard CWnd-derived controls like CButton and CEdit. But there are a few controls I had to create from scratch (i.e. derived directly from CWnd).
Boards There are three types of boards where stock information can be displayed. The first is the Stock Board which is my version of the Big Board. It lists all the stocks loaded into memory along with certain values associated with each stock. You'll will notice that the list control is not a standard MFC or Win32 control. I wrote a new control in order to get colored output as well as on-the-fly sorting, both of which the CListView control cannot do. You can view the code for the control (RwBoardCtrl) in the junkyard. The second is the Scout Board. Stocks listed on the left window have a positive score and are good candidates for buying. Those on the right window have negative scores making them good candidates for shorting. Stocks in the middle window currently has a score of zero, but these stocks still receive ticker updates. A stock being promoted could bump off one of these zero-rated stocks off the board. On both this board and the Stock board, stocks listed in green have a positive change in price. Those stocks that are going down are listed in red. All other stocks that are unchanged remain black. Last, there are the two Trade Boards which list the current open positions on both the real and simulated accounts. The colors scheme here differs from the other boards. Green marks which positions the program can close for profit. Black indicates positions that the program will not trade. Red indicates those positions that the program could sell for a loss. Normally, greens do not show up often as those positions are quickly closed to lock in the profits. Short positions that are losing money will always be red since the program has an emergency bailout feature in case the position is losing too much money.
Stock Details If I want to watch a particular stock closely, I can open the detail window for that stock. The window contains all information the program gathered for the stock including historical and intraday pricing, recent tickers, news, can calculated variables.
The are three custom controls on this window. The first is the Chart control that displays chart data graphically. I can view today's chart or zoom-in to view data for the last hour. I can also zoom out to display 7 day or 12 week data. The second control is the Ticker control located at the bottom of the window. It shows the last few tickers received by the program for the stock. The third control is not shown above but is located under the Data tab. The Properties control lists all the stocks variables as well as their values in tabular form. Sample code for these controls can be found on the next page.
|
|||
|
|