first commit
This commit is contained in:
commit
aa7869eb33
386 files changed
+69375
No files matched your search
@@ -0,0 +1,37 @@
|
||||
var settings = {
|
||||
wait: 0,
|
||||
// advice: 'short'
|
||||
advice: 'long'
|
||||
};
|
||||
|
||||
// -------
|
||||
|
||||
var _ = require('lodash');
|
||||
var log = require('../core/log.js');
|
||||
|
||||
var i = 0;
|
||||
|
||||
var method = {
|
||||
init: _.noop,
|
||||
update: _.noop,
|
||||
log: _.noop,
|
||||
check: function() {
|
||||
|
||||
// log.info('iteration:', i);
|
||||
if(settings.wait === i) {
|
||||
console.log('trigger advice!');
|
||||
this.advice({
|
||||
direction: settings.advice,
|
||||
trigger: {
|
||||
type: 'trailingStop',
|
||||
trailPercentage: 0.5
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
i++
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = method;
|
||||
Reference in new issue
Block a user