// stop loss levels for different profits before leverage settableWithVar double profitLevel1; settableWithVar double stopLoss1; settableWithVar double profitLevel2; settableWithVar double stopLoss2; settableWithVar double profitLevel3; settableWithVar double stopLoss3; settableWithVar double profitLevel4; settableWithVar double stopLoss4; swappable MultiStopLossJuicer makeJuicer() { new MultiStopLossJuicer j; for (int i = 1; i <= 4; i++) { double profitLevel = toDouble(get(this, "profitLevel" + i)); double stopLoss = toDouble(get(this, "stopLoss" + i)); if (profitLevel != 0 || stopLoss != 0) j.addLevel(profitLevel, stopLoss); } ret j; }