Bitcoin Forum
May 30, 2024, 07:38:46 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 »
141  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: July 06, 2013, 08:34:57 AM
Wait where do I set the trade I'm trying for a different coin not btc I think I just set it to the coin I want but than where do I put the price I want to buy and sell at

On BTC-e Gekko currently only supports BTC. You can read every supported currency pair per exchange here. There is a discussion about using a different data provider so that altcoins are supported on Github. But unfortunatly this is not possible yet.

ok i've set this up again now i get this
node gekko

/Users/chiznillen/gekko/config.js:28
 Monitor the live market
         ^^^
SyntaxError: Unexpected identifier
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.util.getConfig (/Users/chiznillen/gekko/util.js:9:12)
    at Object.<anonymous> (/Users/chiznillen/gekko/util.js:66:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

Line 28 is a comment, this is so I can explain what the block below does. Comments always need a double slash in front of them. So you should change:

Code:
 Monitor the live market

 to
 
Code:
// Monitor the live market

Note that Gekko is a very technical tool, if you are having a lot of trouble with editing configuration files and watching the command line instead of a screen with a graph I recommand you to check out these similar projects. They are more focused on a user friendly tool.


EDIT:

The API key and secret can be generated on the profile page on btce. Gekko only need trade rights.

Correction: gekko need trade and info right on BTC-e, so that it knows the size of the orders it needs to create.
142  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: July 06, 2013, 01:13:33 AM
let me know if it works!

Did you see this document? Anyway here is how you can configure Gekko to auto trade on BTC-e:

Code:
config.normal = {
  enabled: true,
  exchange: 'BTCe', // 'MtGox', 'BTCe' or 'Bitstamp'
  currency: 'USD',
  asset: 'BTC',
  tradingEnabled: true,
  key: 'your API key',
  secret: 'your API secret',
}

The API key and secret can be generated on the profile page on btce. Gekko only need trade rights.

I'm off to bed now.
143  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: July 06, 2013, 01:03:45 AM
I have finally found the bug regarding BTC-e monitoring. Gekko broke over BTC-e monitoring because bitcoinCharts (the API Gekko uses to get trade data from BTC-e) changed the way services can ask for trade data (silently).

Current workaround for BTC-e users:
  • Set debug in the config to true (line 145)
  • Set the candles to something lower than 40 (line 22)
  • Run Gekko
  • Check whether the calulcated EMAs are NaN, if they are lower the 40 number

The reason the 40 number can be different is that now bitcoinCharts will return the last 2000 trades, and how long ago the oldest one happened depends on the market.
144  Local / Beurzen / Re: Profiteer van prijsverschil tussen de beurzen on: July 05, 2013, 09:55:31 PM
De enige reden dat er zo'n verschil is tss Bitstamp en Mtgox komt doordat de rekeningen in $/€ enz op MTgox geblokkeerd zijn voor x weken...legal issues

Iedereen met funds op MTgox is die nu aan het omzetten in BTC (koersstijging) en aan het verhuizen naar Bitstamp en daar aan het verkopen (koersdaling).
Als je wenst dat je rekening wordt geblokkeerd dan zou ik aan deze arbitrage deelnemen :-)

(ter info: kijk wat er met bitcoin-24 is gebeurd)

Arbitrage is niet verboden.

Maar volgens mij inmiddels allang niet meer winstgevend.
145  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: July 05, 2013, 08:02:22 PM
Can i use this to trade LTC at BTC-e?

Not at this moment, there are plans as discussed on Github though.

Nope, no web page.

Anyway, using Bitstamp all of a sudden, everything is NaN

Hmm that's a bug for sure, I'll look into this in an hour or so! You are using the latest version, right?

ok no page or anything so it's all done in terminal but why does mine site there and thats all?

The bot looks at the market every [interval] to see wether the EMA strategy suggests to go either long or short (you should either buy or sell bitcoin) by riding the trend. You can change the settings in config.js, take a look at this document which describes what everything means.

[interval] is a setting of the EMA strategy which is the period in minutes per candle. This means Gekko will only recheck what to do every [interval] minutes, default is 60 minutes.
146  Bitcoin / Bitcoin Discussion / Re: People a lot of times forget that we live in a digital world on: July 05, 2013, 11:57:39 AM
People a lot of times forget that we live in a digital world and every our purchase can be easily tracked. Use paper money to save ur privacy.

That is just in the current digital state IMO, a state not bound to the platform itself. If you look at initiatives like Zerocoin this will hopefully change in the future.
147  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: July 04, 2013, 10:12:46 AM
Hmm that is strange, but there have been some strange things happening in the market in the last couple of days.

I will try to rerun Gekko on on the past few weeks with your settings to see what I get. But remember that Gekko tries to predict trends and it can be wrong sometimes. If you set it up last year the total would have turned up profitable (can't promise anything about the future).
148  Economy / Trading Discussion / Re: TRADING BOT: iTrader - Trade your cryptocurrencies... Professionally! on: July 04, 2013, 09:39:32 AM
if i buy do i get newer relases for free ?

best regards

Hektek

It now seems that if you buy you won't get anything at all, see above.
149  Economy / Trading Discussion / Re: Candle Calculation script on: July 04, 2013, 09:37:24 AM
I wondered if this script could be used to visualize trades in a phonegap app?

The script outputs plain numbers to a text file. I guess this data could be used to serve as input for some graphing library. I would suggest to rewrite it to output JSON instead of csv though, or you could convert it to something else after running it.

I'm going to update the script soon to also include volume (and thus store as OHLCV candles).
150  Economy / Speculation / Re: Best practices around backtesting strategies on: July 03, 2013, 01:27:50 PM
I think that is a good idea and backtesting is essential. I am doing the same.

Thanks for your example, nice to see others doing the same thing. Right now my tool is purely command line and not graphical, but I think when backtesting it is important to communicate what is happening inside the simulation. So I think I'll also add graphs to the backtester so users can study the strategies behaviour across the timerange, instead of just the output.

I suggest you don't use for backtesting all the bubble data as it will probably confuse the model. We are now at a very plain market it seems. Add maybe some movement from the very last part of the bubble so the model also reacts to some harsh movements. If you use all the bubble it might do some great decisions during the bubble and not a single signal during the plain period and you probably don't want that.

It appears that we currently are not in a bubble, but if one were to come (or a crash) suddenly I do think it is important to know that how the strategy will handle harsh situations (I think in a broader sense than one specific part just before or behind a bubble). Also the definition of a crash and bubble is pretty subjective I think, right? What if the there is a more gradual crash (like from now till december the BTC price dropping 10$ every month)?

Also make sure the model makes enough buy/sell signals. Only two or three signals might mean that your model has overlearned the data (like if it has been designed specifically for the underlying data and it for example buys at the lowest and sells at the highest giving a very high but not "real" model.) and that probably won't work with new info. If it consistently executes buy/sell signals  duing all the time it probably is good. So add a limitation so it performs for example a minimum of one signal at least every X days.

Good point, I am currently logging the timespan in days and the amount of trades that happened but not the average time between trades (simple division of those two). Will add this.

You might also want to test your model against somewhat random created series of data (or from other stocks) to check how well it performs with those so you cover aswell the unpredicted and it does not perform horribly in a unexpected market situation.

Good point, especially testing against assets that are in the real stock market at this point as we all hope that one day trading BTC would be just as normal as any other currency (like FX). Will add some datasets for non crypto related assets.

Also take in account the commission and the slippage depending on the amount traded every time.

The bot does take fees into account (same as commission?) which you can configure yourself at the moment, it's not really advanced in that it can take a fee structure and calculate the fees dynamically (based on trade amount across the passed month like how Mt. Gox does it). So I will look into that.

The slippage is a bit harder one, as right now I only need to keep track of candle data. I think that the difference when trading small amounts is negligible but becomes more important when the investment increases. Not sure how to handle this yet, does your simulation take slippage into account?

--

back testing is never anywhere near true results.

I have unsuccessfully messed around with metatrader for fx trading and designed some system that looked great when back tested, but fall flat (or eventually fall) over time.

If possible forward test for a month .. don't place trades, rather just record what the trade would have been and work out the PnL from there.

A month lost in trading will mean nothing in the long run if the system is profitable, but can save you big bucks.

I also think it's pretty hard to predict the future based on the history. However it is the only thing we have (apart from things like fundamental trading). But it at least provides some grip. My bot already supports paper trading (simulating trades in the live market).

But when you are evaluating the results a month later you are doing the same thing as running a backtest for the previous month, right? Because after that month you still don't know if it will work the next month.
151  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: July 03, 2013, 11:10:37 AM
I think that backtesting is a very important part of Gekko and trading on TA in general so I'm trying to make a really solid backtesting platform. But unfortunately I don't have any experience in backtesting so I could really use help:

  • Are you experienced in trading? I created a topic in the speculation board about backtesting in general, what features does a backtesting platform need and how do I go about making a solid one?
  • Are you a programmer with experience in javascirpt? The code needs to get checked! Because as Linus said "given enough eyeballs, all bugs are shallow".
  • Also if you are using it all feedback is appreciated, and if you are not for a specific reason: what do you want improved / changed?
152  Economy / Speculation / Best practices around backtesting strategies on: July 03, 2013, 10:18:17 AM
Greetings,

I wasn't sure where to post this question, but I figured finding profitable trade strategies using backtesting would fall under speculating about what the price is going to do. I am working on a trading bot and I'm currently implementing backtesting functionality. My background is in IT and not in trading, so hence I got a couple of questions on how this is normally done.

My current backtesting feature is pretty simple: define a TA strategy with its parameters, define the dates from where to where you want to backtest it and my bot will run the simulations. Currently it works really simple by just receiving a new candle every tick and the strategy can decide to act based on this new candle and all previous ones, this loops until all candles in the timerange are dealt with. When it's done it will spit out the results like so:

Code:
2013-06-30 13:25:30 (INFO):	(PROFIT REPORT) start time:			 2013-04-24 07:00:00
2013-06-30 13:25:30 (INFO): (PROFIT REPORT) end time: 2013-05-23 16:00:00
2013-06-30 13:25:30 (INFO): (PROFIT REPORT) timespan: 29 days

2013-06-30 13:25:30 (INFO): (PROFIT REPORT) start price: 121.6
2013-06-30 13:25:30 (INFO): (PROFIT REPORT) end price: 125.44
2013-06-30 13:25:30 (INFO): (PROFIT REPORT) Buy and Hold profit: 3.158%

2013-06-30 13:25:30 (INFO): (PROFIT REPORT) amount of trades: 15
2013-06-30 13:25:30 (INFO): (PROFIT REPORT) original simulated balance: 245.404 USD
2013-06-30 13:25:30 (INFO): (PROFIT REPORT) current simulated balance: 281.819 USD
2013-06-30 13:25:30 (INFO): (PROFIT REPORT) simulated profit: 36.415 USD (14.839%)
2013-06-30 13:25:30 (INFO): (PROFIT REPORT) simulated yearly profit: 447.030 USD (182.161%)

So I got a couple of questions for those more familiar with trading

  • Is this simple way of implementing backtest solid enough? I would say there is a big gap between fine tuning parameters until the profit % becomes the highest and finding a strategy that would work on the real market. I know backtesting doesn't tell you anything about the future philosophically, but statistically it can be pretty smart, right?
  • Isn't it smarter run a bunch of simulations (with different parameters) on the first part of the timerange, and apply the most profitable ones on the second part to get a more accurate number towards the current time and thus current environment of the market
  • How should I deal with previous price bubbles, I know another bubble can happen again but I doubt they will look the same every time. Therefor I do not think it is wise to tweak a strategy towards a bubble that happened in the past, right?
  • Is the output data something you'd expect on backtesting functionality? Are there things missing that also need to be taken into account

Any feedback is appreciated!
153  Economy / Trading Discussion / Re: Discussion for MtGox trade data downloader on: July 02, 2013, 07:20:33 PM
Looks great, will test it out tonight!

Thank you, that's great work Smiley I'll look into porting it to python and including it in the downloader soon if that's ok with you.

Yes of course! It would be much better to be part of your tool instead of being a separate script (relying on a separate dev environment). It is a pretty simple script but if you need help porting it just let me know. I would have done it myself if I was able to code something in Python (learning it is on my list).

--

Thanks for your contributions to the community Smiley We definitely need more initiatives like this.
154  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: July 02, 2013, 04:18:49 PM
When real trading is enabled, is there some kind of limit I can impose on it so it uses a small amount of my money for trading instead of my whole balance?
Again, for Bitstamp.

At this moment not yet, it is on my todo list though!
155  Economy / Service Discussion / Re: (Node.js) Build your own bot kit for CoinChat on: July 01, 2013, 05:23:55 PM
Windows doesn´t understand what you are trying to do with the command `socket io-client`, neither am I for that matter.

You can run a node script by typing in `node [scriptname]` instead of just the name of the script.

EDIT: so you can use the script provided by the OP, this means: copy and paste the script in a file, call it something.js and put it in the same directory. After that you can run it using node in your terminal.
156  Economy / Trading Discussion / Re: Candle Calculation script on: July 01, 2013, 11:02:55 AM
I'm wondering what is common practice for handling missing candles? For sure, the candlestick generator can simply ignore them, but wouldn't it cause errors when data is fed to technical analysis/charts algorithms?

Gekko uses these candles when you want to backtest. this is how I solved it for now:

Quote
When there are missing candles Gekko will act as if the whole duration of the missing candle never happened.
157  Local / Beurzen / Re: Nieuwe Nederlandse exchange van start. on: July 01, 2013, 09:07:37 AM
we hebben een aantal extra beveiligings maatregelen getroffen. deze kunnen jullie lezen in topic

https://bitcointalk.org/index.php?topic=247170.0

Inzake het bruteforcen van de wachtwoorden in de database heb ik begrepen van onze beveiligings expert dat de opmerkingen maar deels opgaan.

Allereerst moet iemand toegang hebben tot je database en daarnaast zijn de wachtwoorden ook nog gesalt waardoor bruteforcen niet meer opgaat.

Dat bruteforcen was meer een uitleg over hoe de hashing in zijn werk gaat en waarom jullie geen veilig algo voor wachtwoorden gebruiken. Het klopt inderdaad dat er eerst in jullie systeem ingebroken zou moeten worden, maar zodra dit gebeurt liggen nu alle wachtwoorden praktisch op straat. Een salt heeft in dat geval waarschijnlijk geen zin meer want zodra kwaadwillenden toegang tot de database hebben hebben ze ook toegang tot je salt.

Dit kan je echt niet veilig noemen anno vandaag. Vraag maar aan Sony wat er gebeurt als je denkt dat het allemaal wel mee valt. Met als groot verschil dat kwaadwillenden de bankrekeningen van al jullie gebruikers kunnen drainen.
158  Economy / Services / Re: B-BOT: New MtGox EMA Trading Platform on: June 30, 2013, 03:18:23 PM
- Is there a statistical analysis of how often the bot was trading right in the last X months, and how often not?

The EMA strategy is based on Goomboo's Journal, assuming the EMA implementation in this bot is the same as in other trade bots you could use a free bot with backtesting capabilities to test different EMA strategies and implement those in this live trading bot. Or you can wait until backtesting is added as a feature in this bot.
159  Economy / Service Discussion / Re: (Node.js) Build your own bot kit for CoinChat on: June 30, 2013, 03:02:57 PM
I cant get this to run without an error, probably doing it wrong, any more advice? it says error on line 1 or something :/

Could you post the error? That way we can see what's wrong.
160  Economy / Service Discussion / Re: [ANN] Looks like cryptsy is adding an API on: June 30, 2013, 02:57:48 PM
Is there any way to get historical trades (so for example by adding a timestamp parameter at the 'markettrades' request?) through the API?
Pages: « 1 2 3 4 5 6 7 [8] 9 10 11 12 13 14 15 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!