Galts-Gulch / avarice

Multi-Indicator Python3 OKCoin CN & Intl Trading Bot/Infrastructure
Other
91 stars 29 forks source link

Simulator wanted to sell even though it was disabled #19

Closed ghost closed 9 years ago

ghost commented 9 years ago

I have 2 of the bots running from different directories. This one is from my live trader:

Candle: 2160 | Price: 1642.61 cny | Time: 01:07:45 | Date: 2015/03/24 FullStochRSID: 82.88775847501012 MACD : We are in a Downtrend | Diff: 0.07920425764382344 MACD Hist: -0.1251305122290011 SIMULATOR: Wanted to SELL -3.1943198086636923e-16 btc at 1642.55 but needed more btc

Simulator wanted to sell, even though it was disabled, and it wanted to sell more btc than what is even listed in the genconfig.py file.

ghost commented 9 years ago

Hit close by accident. I wanted to say that yes my simulator and live trader are using different Websocket keys.

RealJohnGalt commented 9 years ago

What version of the software are you on? And could you please paste the simulator and trader section of genconfig.py without your API keys? That's a very small negative number also, so the main issue here is that simulator is disabled but still printing info.

FYI you only need API keys to use the trader.

RealJohnGalt commented 9 years ago

If you're on one of the later versions, it's worth noting that there's no longer an "Enabled" option for Simulator, just "Verbose" https://github.com/Galts-Gulch/avarice/blob/master/genconfig.py#L39

ghost commented 9 years ago

I'm using Avarice 3.3.2.

class Trader: Enabled = True Verbose = True

All of the following is also used by Simulator

TradeIndicators = [['MACD', 'FullStochRSID']] AdvancedStrategy = 'Default' TradeVolume = 99 SingleTrade = False TradePersist = False TradeDelay = 3 ReIssueSlippage = 0.12 ReIssueDelay = 5

class Simulator: Verbose = True Asset = 1 Currency = 0

I know that the enabled feature is not on this version, I assumed that if trader was enabled, simulator would be disabled.

RealJohnGalt commented 9 years ago

You need to set Verbose to False to disable printing simulator info. This was a part of the notifier changes, so you could have printing disabled but still be notified of simulated trades. I just realized documentation wasn't updated for this part of the change, so I'll be sure to also update it.

ghost commented 9 years ago

Got it, I've made the change in the config. Thanks appreciate the quick response.

RealJohnGalt commented 9 years ago

No problem. Thank you again for testing. I'm closing this issue since you got it fixed.