-
Notifications
You must be signed in to change notification settings - Fork 63
Script Library
Graham Crockford edited this page Mar 15, 2019
·
2 revisions
Here are a few simple scripted order types which are both useful and a base for you own creations.
As described here.
Name | Description | Default | Reqd |
---|---|---|---|
amount | Amount | Yes | |
limitPrice | Limit price | Yes | |
stopPrice | Stop price (BTC Binance) | Yes |
var subscription
function start() {
subscription = events.setTick(
function(event) {
if (Number(event.ticker().getLast()) < Number(parameters.stopPrice)) {
notifications.alert("BTC hit stop price (" + event.ticker().getLast() + "). Triggering stop on " + selectedCoin.base)
trading.limitOrder({
market: parameters.selectedCoin,
direction: SELL,
price: parameters.limitPrice,
amount: parameters.amount
})
control.done()
}
},
{ exchange: "binance", base: "BTC", counter: "USDT" }
)
return RUNNING
}
function stop() {
events.clear(subscription)
}
© 2018 Graham Crockford. All Rights Reserved.
- Home
- Why Orko?
- What can it do?
- Project status
- Roadmap
- Installing locally
- Installing using Docker
- Installing on Heroku
- Configuration Guides
- User Guide
- Supporting the project
- Contributing
- Developer Guide