Skip to content

Commit

Permalink
Fix cyc propt to ma_short-ma_long
Browse files Browse the repository at this point in the history
  • Loading branch information
josephchenhk committed Dec 21, 2022
1 parent 5a671f3 commit 2d0a1a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qtalib/indicators.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ cpdef double CYC(
if abs(ma_diff_max - ma_diff_min) < 1e-9:
return cyc
else:
delta = 100 * (ma_diff_max - ma_diff[-1]) / (ma_diff_max - ma_diff_min)
delta = 100 * (ma_diff[-1] - ma_diff_min) / (ma_diff_max - ma_diff_min)
return alpha * (delta - cyc) + cyc


Expand Down

0 comments on commit 2d0a1a6

Please sign in to comment.