Skip to content

Instantly share code, notes, and snippets.

@alexcrownjr
Created February 5, 2021 19:04
Show Gist options
  • Save alexcrownjr/702aeaf964e0d08206ecb732ba013e8b to your computer and use it in GitHub Desktop.
Save alexcrownjr/702aeaf964e0d08206ecb732ba013e8b to your computer and use it in GitHub Desktop.
trendFollower(ETHUSDT) {
continue(if=valueIsBuy, value={{strategy.order.action}});
exchangeSettings(leverage={{plot("leverage")}});
wait(1s);
market(side=buy, amount={{strategy.order.contracts}});
}
trendFollower(ETHUSDT) {
continue(if=valueIsSell, value={{strategy.order.action}});
wait(1s);
market(side=sell, amount={{strategy.order.contracts}}, reduceOnly=true);
}
#bot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment