forked from fin-hypergrid/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d110c29
commit 7a00b18
Showing
15 changed files
with
438 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
single-process treetable server | ||
------------------------------- | ||
|
||
u.q creates example table, updates price and quantity | ||
t.q computes simple treetable | ||
w.q websocket interface and hypergrid API | ||
|
||
start treetable/web process (port 12345): | ||
|
||
cd s1 | ||
q u.q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/// copyright stevan apter 2004-2015 | ||
|
||
\e 1 | ||
\p 12345 | ||
\P 14 | ||
\c 25 150 | ||
\t 2000 | ||
|
||
\l t.q | ||
\l w.q | ||
|
||
// example | ||
|
||
holdingId:`abcde`bcdef`cdefgh`defgh`efghi`fghij`ghijk | ||
symbol:`msft`amat`csco`intc`yhoo`aapl | ||
trader:`chico`harpo`groucho`zeppo`moe`larry`curly`shemp`abbott`costello | ||
sector:`energy`materials`industrials`financials`healthcare`utilities`infotech | ||
strategy:`statarb`pairs`mergerarb`house`chart`indexarb | ||
|
||
n:1000000 | ||
T:([tradeId:til n] | ||
holdingId:n?holdingId; | ||
symbol:n?symbol; | ||
sector:n?sector; | ||
trader:n?trader; | ||
strategy:n?strategy; | ||
price:50+.23*n?400; | ||
quantity:(100*10+n?20)-2000; | ||
date:2000.01.01+asc n?365; | ||
time:09:30:00.0+n?23000000) | ||
|
||
G:`sector`trader`strategy | ||
A[`price]:(avg;`price) | ||
A[`tradeId]:(.tt.nul;`tradeId) | ||
|
||
/ define Z | ||
.js.set()!(); | ||
|
||
/ update | ||
.z.ts:{update price:price+-.5+count[T]?1.,quantity:quantity+-5+count[T]?10 from`T;.js.ups`price`quantity;} |
Oops, something went wrong.