// stop loss juice points settableWithVar double stopLoss = 1; // juice points to start trailing at settableWithVar double trailStart = 1; // pullback juice points from crest to close position settableWithVar double callbackRate = 0.3; swappable TrailingStopJuicer makeJuicer() { new TrailingStopJuicer j; j.stopLossLimit(-stopLoss); j.stopLossEnabled(true); j.trailStart(trailStart); j.callbackRate(callbackRate); ret j; } selfType takeProfit(double tp) { ret trailStart(tp).callbackRate(0); }