1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
/*b
* Copyright (C) 2001,2002 Rick Richardson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Rick Richardson <rickr@mn.rr.com>
b*/
void l2sr_popup(STOCK *sp, STREAMER sr);
int l2sr_command(int c, STREAMER sr);
void l2sr_display(STREAMER sr, int on);
char *mmid_lookup(char *mmid);
/*
* T&S Trade record
*/
#define TS_ATHIGH 3
#define TS_ABOVE 2
#define TS_ATASK 1
#define TS_SPREAD 0
#define TS_ATBID -1
#define TS_BELOW -2
#define TS_ATLOW -3
void l2sr_trade(STREAMER sr, double price, int size, int time,
int row, int tstype);
/*
* Order book interface from streamer to popup
*
* For SEAQ style order book.
*/
typedef struct
{
#define MMIDLEN 8
char mmid[MMIDLEN+1];
double bid;
int bidsz;
double ask;
int asksz;
int time; // Time in seconds since midnight
char code;
char bidtick;
char asktick;
} L2BA;
void l2sr_ba(STREAMER sr, char *sym, L2BA *bap, int numba);
int l2sr_getlast(STREAMER sr, char *sym, char *mmid, L2BA *bap);
/*
* Order book interface from streamer to popup
*
* For SETS style order book.
*/
typedef struct
{
#define RECIDLEN 12
char recid[RECIDLEN+1]; // Record ID
char mmid[MMIDLEN+1];
double price;
int size;
int time; // Time in seconds since midnight
int key2;
char isbid;
char code;
char tick;
} L2SETS;
void l2sr_sets(STREAMER sr, char *sym, L2SETS *setsp, int numsets);
|