Transpiled version (52L) is out of date.
1 | interface PriceCells {
|
2 | bool isCellLimit(double price); |
3 | |
4 | // next-higher cell limit or NaN if no more cells |
5 | double nextCellLimit(double price); |
6 | |
7 | // next-lower cell limit or NaN if no more cells |
8 | double previousCellLimit(double price); |
9 | |
10 | // go n steps down |
11 | double nCellLimitsDown(double price, int n); |
12 | |
13 | // go n steps up |
14 | double nCellLimitsUp(double price, int n); |
15 | |
16 | // convert to "cell space" (0=first cell limit, 1=next cell limit, -1=previous cell limit etc) |
17 | double priceToCellNumber aka toCellNumber(double price); |
18 | |
19 | double cellNumberToPrice aka fromCellNumber(double cellNumber); |
20 | |
21 | default double basePrice() { ret cellNumberToPrice(0); }
|
22 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1036205 |
| Snippet name: | PriceCells - defines fixed price levels (finitely or infinitely many) |
| Eternal ID of this version: | #1036205/7 |
| Text MD5: | b882e620069466a7abbbefd85697c44f |
| Author: | stefan |
| Category: | javax / trading |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-11-19 11:54:46 |
| Source code size: | 696 bytes / 22 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 768 / 932 |
| Version history: | 6 change(s) |
| Referenced in: | [show references] |