diff --git a/index.js b/index.js index 939ed18..51afa5e 100644 --- a/index.js +++ b/index.js @@ -136,6 +136,8 @@ async function onNewBar(bar) { position: { side: position.side, entry: position.entry, + sl: position.sl, + tp: position.tp, qty: position.qty } }); @@ -173,7 +175,7 @@ function enterMarket(sig) { function checkExit() { if (!position || curPrice === null) return; - const { side, entry, qty, sl, tp } = position; + const { id, side, entry, qty, sl, tp, fe, ib} = position; let exit = null; if (side === 'LONG') {