-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Compare buy/sell price #772
Comments
Hey @talvasconcelos,
Gekko works with the ideas of strategies, this would be logic that you'd have to script in your own strategy (or based on an existing strategy). The exact same issue came up some time ago, see here for context as well as implementation: #502.
If your strategy is not buying or selling it is caused by these condionals:
I would suggest logging all the variables inside the if statements to see why the never evaluate to true. For example by logging just above the if check:
|
I am closing this, but feel free to ask more questions :) |
Sorry for my noob questions... so there's only 1 buy order at a time? until the bot sells it doesn't buy again? Thanks for the help above, it's gold... i had the conditionals different:
but it seemed not to work like it was supposed... i tend to console log a lot to check where i am and what values come out. Thanks again for your help. |
Within Gekko buying and selling is separate from the strategy. A strategy is simply a script that gets candles and outputs advices ( In an ideal situation there is only a single buy order per advice (this is always the case with paper trader, since it's a simulation). But the real trader might create multiple orders depending on the orderbook, etc. |
Write all the values out per candle to a csv :) |
why log.debug is not working? |
You need to import var log = require('../core/log'); |
Hi @askmike , is there any way i can, on sell, check if the price is lower than what was bought?
I mean i want the trader, when given an advice to sell, or before that, to check if price is lower than originally bought. If so, hold the coins/assets whatever...
Thanks,
Tiago
BTW, this is my attempt at a strategy, is very rough. Performs well on sim, been running live on my RPi3 and no buy or sell yet...
Rename file to .js
CCIRSI .txt
Rename to .toml
CCIRSI .txt
The text was updated successfully, but these errors were encountered: