Libraryless. Click here for Pure Java version (24274L/148K).
1 | concept G22TradingAccount extends ConceptWithChangeListeners {
|
2 | settableWithVar S name; |
3 | settableWithVar S platform; |
4 | settableWithVar S comment; |
5 | |
6 | settableWithVar bool enabled = true; |
7 | |
8 | settableWithVar Double equity; |
9 | |
10 | settableWithVar L income; |
11 | settableWithVar L executions; |
12 | |
13 | settable transient Cl positions; |
14 | settable transient O session; |
15 | |
16 | settable double imaginaryEquity; |
17 | |
18 | File credentialsFile() {
|
19 | ret javaxSecretDir("Trading-Accounts/" + id + ".cred");
|
20 | } |
21 | |
22 | toString {
|
23 | ret "Account " + id + appendRoundBracketed(commaCombine(name, platform, equity)); |
24 | } |
25 | |
26 | double fullEquity() {
|
27 | ret unnull(equity)+imaginaryEquity; |
28 | } |
29 | } |
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1037257 |
| Snippet name: | G22TradingAccount |
| Eternal ID of this version: | #1037257/16 |
| Text MD5: | 1c3cddce1fed20cb1cfb1b824f6fb57f |
| Transpilation MD5: | 478f7e399b451a2f5a6cf01e1871d5c7 |
| Author: | stefan |
| Category: | javax / trading |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2024-07-28 12:25:09 |
| Source code size: | 697 bytes / 29 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 812 / 1047 |
| Version history: | 15 change(s) |
| Referenced in: | [show references] |