From 1375d3f21c13d7217488686d750361b6033cb2f3 Mon Sep 17 00:00:00 2001 From: Micah Kendall Date: Thu, 5 Sep 2024 16:18:19 +1000 Subject: [PATCH] math algo variables --- gema.typ | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gema.typ b/gema.typ index bd47771..6647201 100644 --- a/gema.typ +++ b/gema.typ @@ -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"