Warning: session_start(): open(/var/lib/php/sessions/sess_n8dgmumv78utkiiaopejglecjo, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
abstract concept G22TradingStrategy extends ConceptWithChangeListeners {
settable bool verbose;
gettable S globalID = aGlobalID();
gettable transient Q q = startQ();
// link to market (optional)
transient settable IFuturesMarket market;
settableWithVar S cryptoCoin;
settableWithVar S marginCoin = "USDT";
settableWithVar bool usingLiveData;
settableWithVar bool doingRealTrades;
settableWithVar bool demoCoin;
settableWithVar bool active;
settableWithVar double adversity = 0.2;
settableWithVar new LS log;
// increment of crypto we can bet on
settableWithVar double cryptoStep = 0.0001;
// minimum crypto we need to bet on
settableWithVar double minCrypto = 0.0001;
swappable long currentTime() { ret now(); }
void log(O o) {
if (o != null)
log.add(print(str(o)));
}
LS activationStatus() {
ret llNempties(
stringIf(active, "active"),
empty(cryptoCoin) ? null
: "coin: " + cryptoCoin + " over " + marginCoin
+ stringIf(demoCoin, " (demo coin)"),
stringIf(market != null, "connected to market"),
stringIf(usingLiveData, "using live data"),
stringIf(doingRealTrades, "real trades")
);
}
abstract Cl openPositions();
abstract Cl closedPositions();
}