<commit_before>/*
  
  This method uses `Exponential Moving Average` to determine the current trend the
  market is in (either up or down). Using this information it will suggest to ride
  the trend.

  @link http://en.wikipedia.org/wiki/Exponential_moving_average#Exponential_moving_average

  This method is fairly popular in bitcoin trading due to Bitcointalk user Goomboo.

  @link https://bitcointalk.org/index.php?topic=60501.0


      Method state: BETA

 */

// set up events so this method can talk with Gekko
var EventEmitter = require('events').EventEmitter;
module.exports = new EventEmitter();

var config = require('../config.js');
var EMAsettings = config.EMA;

// helpers
var moment = require('moment');
var _ = require('underscore');
var util = require('../util.js');
var log = require('../log.js');<commit_msg>improved documentation about the trading method<commit_after>/*
  
  This method uses `Exponential Moving Average crossovers` to determine the current trend the
  market is in. Using this information it will suggest to ride the trend. Note that this is
  not MACD because it just checks whether the longEMA and shortEMA are [threshold]% removed
  from eachother.

  @link http://en.wikipedia.org/wiki/Exponential_moving_average#Exponential_moving_average

  This method is fairly popular in bitcoin trading due to Bitcointalk user Goomboo.

  @link https://bitcointalk.org/index.php?topic=60501.0


      Method state: BETA

 */

// set up events so this method can talk with Gekko
var EventEmitter = require('events').EventEmitter;
module.exports = new EventEmitter();

var config = require('../config.js');
var EMAsettings = config.EMA;

// helpers
var moment = require('moment');
var _ = require('underscore');
var util = require('../util.js');
var log = require('../log.js');
{'fraction_non_alphanumeric': 0.10625345877144439, 'fraction_numerical': 0.006640841173215274, 'mean_word_length': 4.1657142857142855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4109287', 'n_tokens_mistral': 546, 'n_tokens_neox': 510, 'n_words': 189}