1 | // stop loss levels for different profits before leverage |
2 | |
3 | settableWithVar double profitLevel1; |
4 | settableWithVar double stopLoss1; |
5 | settableWithVar double profitLevel2; |
6 | settableWithVar double stopLoss2; |
7 | settableWithVar double profitLevel3; |
8 | settableWithVar double stopLoss3; |
9 | settableWithVar double profitLevel4; |
10 | settableWithVar double stopLoss4; |
11 | |
12 | swappable MultiStopLossJuicer makeJuicer() {
|
13 | new MultiStopLossJuicer j; |
14 | for (int i = 1; i <= 4; i++) {
|
15 | double profitLevel = toDouble(get(this, "profitLevel" + i)); |
16 | double stopLoss = toDouble(get(this, "stopLoss" + i)); |
17 | if (profitLevel != 0 || stopLoss != 0) |
18 | j.addLevel(profitLevel, stopLoss); |
19 | } |
20 | ret j; |
21 | } |
Began life as a copy of #1036535
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1036612 |
| Snippet name: | MultiStopLossJuicer maker include |
| Eternal ID of this version: | #1036612/1 |
| Text MD5: | aa183da7761d4d66d17489f724f37921 |
| Author: | stefan |
| Category: | javax / gazelle 22 |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2023-04-29 00:14:34 |
| Source code size: | 693 bytes / 21 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 363 / 416 |
| Referenced in: | [show references] |