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

30
LINES

< > BotCompany Repo | #1036353 // AbstractJuicer

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (14714L) is out of date.

persistable abstract sclass AbstractJuicer extends MetaWithChangeListeners {
  // what we are monitoring & closing (a position or a strategy)
  settableWithVar Juiceable juiceable;
  
  settableWithVar double juiceValue;
  
  // last calculated signals
  settableWithVar L<SignalWithStrength> currentSignals;
  
  event calculatingCloseSignals(L<SignalWithStrength> outList);
  
  // must return a new list
  swappable L<SignalWithStrength> calculateCloseSignals() {
    grabJuiceValue();
    new L<SignalWithStrength> signals;
    calculatingCloseSignals(signals);
    currentSignals(signals);
    ret signals;
  }
  
  void grabJuiceValue {
    juiceValue(juiceable.juiceValue());
  }
  
  selfType configClone() {
    ret restructure(this);
  }
  
  void copyTransientValuesFrom(AbstractJuicer juicer) {}
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1036353
Snippet name: AbstractJuicer
Eternal ID of this version: #1036353/16
Text MD5: 987ff5cd5c876daec3c9ad081b3344b7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-12-05 00:28:33
Source code size: 840 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 29 / 79
Version history: 15 change(s)
Referenced in: [show references]