Pages:
Author

Topic: tAPI-bot - Automated crossover trade platform for BTC-e [INACTIVE 2013-10-15] - page 2. (Read 36345 times)

hero member
Activity: 490
Merit: 500
Hello,

Maybe you can add on settings.ini something like this:

Code:
ThresholdBuy = 0.02
ThresholdSell= 0.02

and on trader.py

Code:
        if signalType == 'dual':
            # lines cross each other = trade signal
            if self.signals.fastMA.value > self.signals.slowMA.value*(1+self.ThresBuy):
                print'Market trending up'
                self.log.info('Market trending up')
                #investigate
                #if self.shortPosition:
                self.placeBid()
            elif self.signals.fastMA.value*(1-self.ThresSell) < self.signals.slowMA.value:
                print'Market trending down'
                self.log.info('Market trending down')
                if not self.shortPosition:
                    self.placeAsk()

Cheers,



There is a fee setting in the ini - maybe someone could come up with some code to implement it?
legendary
Activity: 1610
Merit: 1000
Crackpot Idealist
Hi nomorecoin
is it not possible to run multiple instances with multiple currencies?
I get always
Code:
Traceback (most recent call last):
  File "Application.py", line 40, in
    runLoop()
  File "Application.py", line 23, in runLoop
    trader.update()
  File "/home/ewi/Downloads/tAPIbot/LTC_USD_tapi/trader.py", line 62, in update
    self.tradeData = self.tapi.update()
  File "/home/ewi/Downloads/tAPIbot/LTC_USD_tapi/api.py", line 24, in update
    self.tradeData['funds'] = output['funds']
TypeError: 'NoneType' object has no attribute '__getitem__'
or is there another problem the reason for this?
TIA

It's mentioned some where in here that he recommends use a separate account per instance. This was cited as a precaution of over buying/selling a shared currency. The advice might also apply to your situation. It would be easy enough to test at least.

Can this bot be run in the command line in a text mode,  or does is require a GUI? eg. x11 on Ubuntu.

I am planning on using a headless Ubuntu server with no mouse, monitor, keyboard.

When I try and run it I get an error as if it want's X11

Code:
 File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1712, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

It does not look like it. Might be worth a pm to the author (have not seen him on this thread in a while)
erk
hero member
Activity: 826
Merit: 500
Can this bot be run in the command line in a text mode,  or does is require a GUI? eg. x11 on Ubuntu.

I am planning on using a headless Ubuntu server with no mouse, monitor, keyboard.

When I try and run it I get an error as if it want's X11

Code:
 File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1712, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
legendary
Activity: 2955
Merit: 1049
Hi nomorecoin
is it not possible to run multiple instances with multiple currencies?
I get always
Code:
Traceback (most recent call last):
  File "Application.py", line 40, in
    runLoop()
  File "Application.py", line 23, in runLoop
    trader.update()
  File "/home/ewi/Downloads/tAPIbot/LTC_USD_tapi/trader.py", line 62, in update
    self.tradeData = self.tapi.update()
  File "/home/ewi/Downloads/tAPIbot/LTC_USD_tapi/api.py", line 24, in update
    self.tradeData['funds'] = output['funds']
TypeError: 'NoneType' object has no attribute '__getitem__'
or is there another problem the reason for this?
TIA
member
Activity: 111
Merit: 10
Possibilities are limitless
Hi, great that you've implemented a bot for BTC-e, I'll start helping with the testing/debugging... Looks like fun.
member
Activity: 70
Merit: 10
Does EMA trading work profitably ? I think not. People have been trying to crack this in fx for years and I doubt anyone makes any money longterm. Obviously there are winners short term but really, if its was this easy we'd all be millionaires.
legendary
Activity: 2955
Merit: 1049
Hello,

Maybe you can add on settings.ini something like this:
.
.
.
and what does this produce?
TIA
sr. member
Activity: 371
Merit: 250
Hello,

Maybe you can add on settings.ini something like this:

Code:
ThresholdBuy = 0.02
ThresholdSell= 0.02

and on trader.py

Code:
        if signalType == 'dual':
            # lines cross each other = trade signal
            if self.signals.fastMA.value > self.signals.slowMA.value*(1+self.ThresBuy):
                print'Market trending up'
                self.log.info('Market trending up')
                #investigate
                #if self.shortPosition:
                self.placeBid()
            elif self.signals.fastMA.value*(1-self.ThresSell) < self.signals.slowMA.value:
                print'Market trending down'
                self.log.info('Market trending down')
                if not self.shortPosition:
                    self.placeAsk()

Cheers,

legendary
Activity: 1610
Merit: 1000
Crackpot Idealist
So I've run this for a couple days with different settings, but I seem to pretty much get the same result.  It appears that I am buying low and selling high, but I am perpetually taking slow but gradual loss.  Is anyone actually making anything using this bot, or is everyone pretty much running into the same thing (as per previous messages in this thread)?
 

PS:  thanks for making this available to everyone Smiley

The fee's kill ya. Stagnant markets kill ya. This is not the easiest bot in the world to work with but has made me some bitchin trades... and then lost the profit through fee's on the following trades. I do not run this bot unattended. As quite as nomorecoin has been I would assume that he is messing with the code as we speak.
full member
Activity: 141
Merit: 100
You get some loss because this bot doesnt take fee into account. So for example you're buy low and sell high but the difference is ~0.1% and trading fee is 0.2% so you get loss ~0.2% per iteration.

Yes that seems to be what is happening.  Looks like it may read the trends/signals/MAs ok, but since it doesn't include a minimum trade threshold, loss is all you will get unless there are larger fluctuations.  I suppose one could insulate against that by making the refresh period much longer than 60 seconds, however, that would only really be a shot in the dark, hoping that over the cycle period a larger fluctuation has occured.
sr. member
Activity: 363
Merit: 250
You get some loss because this bot doesnt take fee into account. So for example you're buy low and sell high but the difference is ~0.1% and trading fee is 0.2% so you get loss ~0.2% per iteration.
full member
Activity: 141
Merit: 100
So I've run this for a couple days with different settings, but I seem to pretty much get the same result.  It appears that I am buying low and selling high, but I am perpetually taking slow but gradual loss.  Is anyone actually making anything using this bot, or is everyone pretty much running into the same thing (as per previous messages in this thread)?
 

PS:  thanks for making this available to everyone Smiley
sr. member
Activity: 363
Merit: 250
nomorecoin can you add trading fee in accounting? your bot works fine except that!

PS also why are you using your custom btceapi port? there is maintained version https://github.com/alanmcintyre/btce-api
legendary
Activity: 1610
Merit: 1000
Crackpot Idealist
newbie
Activity: 27
Merit: 0
yep.. got it now many thanks.. doh! Roll Eyes
legendary
Activity: 1610
Merit: 1000
Crackpot Idealist
Code:
# Ribbon:
# Note: ribbonStart + (3*ribbonSpacing) MUST BE < 150!
# This is because the platform only looks at last 150 trades (max returned by API)
ribbonStart = 49
ribbonSpacing = 50

This is correct. Start is 49. Spacing is 50. 49 + 50 = 99. 99 + 50 = 149

This logic is here:

Code:
# Note: ribbonStart + (3*ribbonSpacing) MUST BE < 150!


Hope this helps.
newbie
Activity: 27
Merit: 0
Hi,
as in i can't figure out how to put the settings in the ini file.. where/ how do i put in the other 3 MA values?

if i want to Set ribbon, start 49, spacing 50, and the MA lines at 49, 99, and 149.

do i put them in

MAtype = 49, 99, and 149 <- like this or 49 99 149 ?


I have this set like below

# Ribbon:
# Note: ribbonStart + (3*ribbonSpacing) MUST BE < 150!
# This is because the platform only looks at last 150 trades (max returned by API)
ribbonStart = 49
ribbonSpacing = 50


thanks..
legendary
Activity: 1610
Merit: 1000
Crackpot Idealist
Trouble as in the bot is not making trades? Or the bot is making trades that are not making you money?

newbie
Activity: 27
Merit: 0

Hi nomorecoin, I am enjoying playing around with this bot, many thanks for your hard work.. One question how does the above setup, look in the settings.ini file?

Cheers..

P.S I get frequent crashes ...RuntimeError: dictionary changed size during iteration?

Can you post the stack trace and relevant system info? That's a new one.

Sure here you go http://110.174.141.187/stacktrace.txt


Oh and running Win 7 64 bit (Prem) with Canopy.. 

Cheers sla73



Hi nomorcoin, am still having trouble trying to set up the [signals] section in settings.ini file for ribbon

could you please post an example?

cheers sla73
legendary
Activity: 2955
Merit: 1049
Recommend separate accounts for anything sharing a base currency in the pairs traded. Multiple instances will not cause an issue, but each instance will attempt to sell/buy with all available currency it sees.
I have tried it with multiple instances (in different directories and different ini's), but:
Code:
Traceback (most recent call last):
  File "Application.py", line 40, in
    runLoop()
  File "Application.py", line 23, in runLoop
    trader.update()
  File "/home/xxx/tAPIbot/tapi_TRC/trader.py", line 62, in update
    self.tradeData = self.tapi.update()
  File "/home/xxx/tAPIbot/tapi_TRC/api.py", line 24, in update
    self.tradeData['funds'] = output['funds']
TypeError: 'NoneType' object has no attribute '__getitem__'
seems no go..
Pages:
Jump to: