mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-15 09:08:04 +00:00
docs: update category index files and fix indicator implementations (#58)
This commit is contained in:
@@ -179,14 +179,9 @@ public sealed class Atrn : AbstractBase
|
||||
double normalized = minAtr < maxAtr ? (currentAtr - minAtr) / (maxAtr - minAtr) : 0.5;
|
||||
|
||||
// Update state
|
||||
if (isNew)
|
||||
{
|
||||
_state = new State(input, true, tr, currentAtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
_state = _state with { LastValidTr = tr, LastValidAtr = currentAtr };
|
||||
}
|
||||
_state = isNew
|
||||
? new State(input, true, tr, currentAtr)
|
||||
: _state with { LastValidTr = tr, LastValidAtr = currentAtr };
|
||||
|
||||
TValue result = new(input.Time, normalized);
|
||||
Last = result;
|
||||
@@ -315,4 +310,4 @@ public sealed class Atrn : AbstractBase
|
||||
}
|
||||
return min;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user