Post
Topic
Board Trading Discussion
Re: Chrome Browser extension: MtGox trading bot
by
CMMPro
on 12/05/2013, 20:52:01 UTC
Beautiful! Thanks for this. I just got out of newbie jail and also wanted to thank Tobbelino for his work as well.
Once I get these up I will definitely send some mBtc your guys way!

I would love to see a better indicator used for the crossover....ideally MACD.
Since we have the two EMA's MACD is simple calculation really...but right now out of my coding talent level.

http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:moving_average_conve&gclid=CJXQ7ZX6kLcCFUNlMgodKXkAxA

MACD Line: (12-day EMA - 26-day EMA)
Signal Line: 9-day EMA of MACD Line
MACD Histogram: MACD Line - Signal Line

That calculation using a multiple day EMA is currently out of the scope of the bot because it will only collect the last 144 samples from Mt Gox. This can be extended to 1000 if you change "const MaxSamplesToKeep = 144;" at the top of background.js but at small intervals won't reach that far to collect that amount of data.

Alternatively the calculation could be done over a shorter time period, or the bot would need to be upgraded to store past data somehow or get it from somewhere else.


Thanks for spending some brain power on thinking about MACD.

I believe in this case you can use the term "period" as opposed to "day".

ie:
MACD Line: (12-period EMA - 26-period EMA)
Signal Line: 9-period EMA of MACD Line
MACD Histogram: MACD Line - Signal Line

With Bitcoin trading operating 24/7 we don't really have a "daily close" to use for reference...so I think that a 15 min-1 hour "period" would suffice.
In all reality I believe the market speed is way faster than anything going on a daily close on Wall St.
I don't think even Forex is moving this fast for the most part...it is running something closer to commodity trading speeds.