Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

21
LINES

< > BotCompany Repo | #1036535 // MultiCallbackJuicer maker include

JavaX fragment (include)

1  
// pullback levels for different profits before leverage
2  
3  
settableWithVar double profitLevel1;
4  
settableWithVar double callback1;
5  
settableWithVar double profitLevel2;
6  
settableWithVar double callback2;
7  
settableWithVar double profitLevel3;
8  
settableWithVar double callback3;
9  
settableWithVar double profitLevel4;
10  
settableWithVar double callback4;
11  
12  
swappable MultiCallbackJuicer makeJuicer() {
13  
  new MultiCallbackJuicer j;
14  
  for (int i = 1; i <= 4; i++) {
15  
    double profitLevel = toDouble(get(this, "profitLevel" + i));
16  
    double callback = toDouble(get(this, "callback" + i));
17  
    if (profitLevel != 0 || callback != 0)
18  
      j.addLevel(profitLevel, callback);
19  
  }
20  
  ret j;
21  
}

Author comment

Began life as a copy of #1036390

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036535
Snippet name: MultiCallbackJuicer maker include
Eternal ID of this version: #1036535/6
Text MD5: 420cf43ea65edf31f1b3a18106ebb216
Author: stefan
Category: javax / gazelle 22
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-01-24 18:08:20
Source code size: 692 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 171 / 194
Version history: 5 change(s)
Referenced in: [show references]