Skip to content

Commit

Permalink
Config changes to enable the new x2MACD method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah White committed Jun 26, 2014
1 parent de84075 commit 7e5dfdb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
24 changes: 16 additions & 8 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ config.watch = {

config.tradingAdvisor = {
enabled: true,
method: 'MACD',
method: 'x2MACD',
candleSize: 1,
historySize: 113
historySize: 239
}

// Exponential Moving Averages settings:
Expand Down Expand Up @@ -63,9 +63,20 @@ config.MACD = {
thresholds: {
down: -9999,
up: 0.00000001,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 1
}
};

// x2MACD settings:
config.x2MACD = {
// EMA weight (α)
// the higher the weight, the more smooth (and delayed) the line
short: 53,
long: 109,
signal: 41,
// the difference between the EMAs (to act as triggers)
thresholds: {
down: -9999,
up: 0.00000001,
}
};

Expand All @@ -80,9 +91,6 @@ config.PPO = {
thresholds: {
down: -9999,
up: 0.00000001,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 2
}
};

Expand Down
4 changes: 4 additions & 0 deletions core/baseTradingMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ var log = require('../core/log.js');
var indicatorsPath = '../methods/indicators/';

var Indicators = {
x2MACD: {
factory: require(indicatorsPath + 'x2MACD'),
input: 'price'
},
MACD: {
factory: require(indicatorsPath + 'MACD'),
input: 'price'
Expand Down
1 change: 1 addition & 0 deletions plugins/tradingAdvisor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var config = util.getConfig();

var methods = [
'MACD',
'x2MACD',
'DEMA',
'PPO',
'RSI',
Expand Down

1 comment on commit 7e5dfdb

@kuzetsa
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also removed the "persistence" config section for PPO method since the logic checks were removed as of 82004f7

Please sign in to comment.