Skip to content

Commit

Permalink
code cleanup: CMO boolean
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Skender <[email protected]>
  • Loading branch information
DaveSkender authored Jul 31, 2024
1 parent 91eab0e commit 5e3333b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/a-d/Cmo/Cmo.StaticSeries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,10 @@ private static List<CmoResult> CalcCmo<T>(
// determine tick direction and size
(bool? isUp, double value) tick = (null, Math.Abs(s.Value - prevValue));

tick.isUp = double.IsNaN(tick.value)
tick.isUp = double.IsNaN(tick.value) || s.Value == prevValue
? null
: s.Value > prevValue
? true
: s.Value < prevValue
? false
: null;

: s.Value > prevValue;

ticks.Add(tick);

// calculate CMO
Expand Down

0 comments on commit 5e3333b

Please sign in to comment.