Skip to content

Commit

Permalink
(fix) ZERO method now has working crystal ball
Browse files Browse the repository at this point in the history
previous commit didn't actually work...
the macd value needed to be obsoleted
  • Loading branch information
Sarah White committed Jul 5, 2014
1 parent f69acaa commit 7c7b9b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion methods/ZERO.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ method.check = function() {
var macd = zero.diff;
var macdiff = zero.result;
var minup = settings.thresholds.up;
// "divination" lets the signal happen sooner
var divination = macd + settings.crystalball;
var filtered = Math.min(macd, macdiff, divination);
var filtered = Math.min(macdiff, divination);

if(filtered >= minup) {

Expand Down

1 comment on commit 7c7b9b5

@kuzetsa
Copy link
Owner

@kuzetsa kuzetsa commented on 7c7b9b5 Jul 5, 2014

Choose a reason for hiding this comment

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

The MACD value itself is the same thing as watching for a vanilla (legacy) EMA crossover.


Side thought unrelated to this change:

Looking at this code, it occurs to me the nomenclature of "diff" and "result" is somewhat unclear and cryptic.
Those should be renamed in the future to make their purpose within the MACD algorithm more apparent.

Please sign in to comment.