{
  "kind": "illustrative",
  "source": {
    "label": "Calculated EMA20 and SMA20 weight profiles",
    "note": "EMA uses alpha = 2/21 and weight alpha \u00d7 (1 \u2212 alpha)^age. SMA assigns 1/20 to ages 0\u201319 and zero afterward. EMA has an infinite tail; displayed ages 0\u201359 omit the remaining 0.247% weight. These are mathematical weights, not market prices or executions."
  },
  "description": "EMA puts almost twice as much weight on the latest close as SMA 20, while keeping a small influence from closes older than 20 candles.",
  "x": [
    "0",
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "10",
    "11",
    "12",
    "13",
    "14",
    "15",
    "16",
    "17",
    "18",
    "19",
    "20",
    "21",
    "22",
    "23",
    "24",
    "25",
    "26",
    "27",
    "28",
    "29",
    "30",
    "31",
    "32",
    "33",
    "34",
    "35",
    "36",
    "37",
    "38",
    "39",
    "40",
    "41",
    "42",
    "43",
    "44",
    "45",
    "46",
    "47",
    "48",
    "49",
    "50",
    "51",
    "52",
    "53",
    "54",
    "55",
    "56",
    "57",
    "58",
    "59"
  ],
  "panels": [
    {
      "label": "Weight on each closing price (%)",
      "domain": [
        0,
        10
      ],
      "series": [
        {
          "id": "ema",
          "label": "EMA20",
          "color": "blue",
          "values": [
            9.523809523809524,
            8.616780045351474,
            7.796134326746572,
            7.053645343246899,
            6.381869596271002,
            5.774072491864241,
            5.224160825972408,
            4.726621699689322,
            4.276467252099863,
            3.8691846566617807,
            3.5006908798368492,
            3.1672917484238163,
            2.8656449152405954,
            2.592726351884348,
            2.3458000326572677,
            2.1223905057375276,
            1.9202580766196682,
            1.7373763550368424,
            1.5719119402714288,
            1.4222060411979596,
            1.2867578467981537,
            1.164209480436425,
            1.0533323870615274,
            0.9530150168651914,
            0.8622516819256494,
            0.7801324741232066,
            0.7058341432543297,
            0.6386118438967746,
            0.5777916682875579,
            0.5227638903554095,
            0.4729768531787039,
            0.4279314385902559,
            0.387176063486422,
            0.3503021526781913,
            0.316940042899316,
            0.2867552769089049,
            0.25944525053662826,
            0.2347361790569494,
            0.21238035248009707,
            0.19215365224389735,
            0.17385330441114524,
            0.157295846848179,
            0.1423152900054953,
            0.1287614528621148,
            0.1164984573514372,
            0.10540336617510984,
            0.0953649503489089,
            0.08628257412520329,
            0.07806518611327916,
            0.07063040648344306,
            0.06390370110406754,
            0.05781763433225158,
            0.05231119296727523,
            0.0473291745894395,
            0.042821634152350026,
            0.038743383280697645,
            0.03505353725396453,
            0.03171510513453934,
            0.028694618931249877,
            0.025961798080654654
          ]
        },
        {
          "id": "sma",
          "label": "SMA20",
          "color": "amber",
          "dashed": true,
          "values": [
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            5.0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ]
        }
      ]
    }
  ],
  "annotations": [
    {
      "index": 0,
      "title": "Latest close",
      "text": "EMA 20 gives the latest close 9.52% weight; SMA 20 gives it 5%."
    },
    {
      "index": 20,
      "title": "The tail remains",
      "text": "SMA 20 drops this close; EMA 20 still carries its decaying contribution. About 13.51% of EMA weight lies at ages 20 and older."
    }
  ],
  "precision": 3
}
