Skip to content

Commit

Permalink
math algo variables
Browse files Browse the repository at this point in the history
  • Loading branch information
micahkendall committed Sep 5, 2024
1 parent 5765f06 commit 1375d3f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions gema.typ
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ The GEMA algorithm uses a single piece of previous state to add a drag for price
This graph demonstrates how the GEMA (red line) closely follows the asset price (blue line) during downward movements, while providing a smoother trend during upward movements.

=== Algorithm
$f(t) = min {
gamma dot f(t-1) + (1-gamma) x_t,
x_t
}$
$x_t$ is the current price \
$gamma = "smoothing" / ("period" + 1)$

#align(center, [
$f(0) = x_0$ \
$f(t) = min {
gamma dot f(t-1) + (1-gamma) x_t,
x_t
}$
])

==== Pseudocode
#import "@preview/algorithmic:0.1.0"
Expand Down

0 comments on commit 1375d3f

Please sign in to comment.