Functions
signal(ex, pair)
signal(ex, pair)
This function must return None
, False
, or True
.
ex
Exchange
pair
Name of the pair being traded
Return
Return
None
if the symbol is not handled by the script. If all scripts returnNone
for the symbol then it will trade based on your settings.Return
False
if the signal is not present.Return
True
if the signal is present. This will allow the bot to place trades based on your settings.
update(ex, pair, last, avg, size, target)
update(ex, pair, last, avg, size, target)
Since v1.2.2
, this function can be used to force the bot to exit its current position and start over.
ex
Exchange
pair
Name of the pair being traded
last
Last price of the pair
avg
Average price of all entries
size
Current position size
target
Current target price
Return
Return
True
to stay in the position.Return
False
(or anything else) to exit the position.
This function should return True
by default if you just want status updates sent to Python.
finished()
finished()
This function is called when the bot is exiting. Depending on how the bot is closed, it may not be called.
Last updated