Demonstration of how history length affects all EMA values by ApopheniaPays on TradingView.comTradingView Script. Free TradingView account required to use. Direct link: https://www.tradingview.com/script/NwvUwIQ3-Demonstration-of-how-history-length-affects-all-EMA-values/I saw some discussion of this so I whipped up an example to prove the that effect of history length on EMA values is pronounced, even for bars much further than the EMA length away from the first candle of the chart.This chart has two 89-bar EMAs of the close: a green one and a red one. However, for the red one, the first 89 bars of the graph are considered to have a close of “0”, which is exactly whatTradingView’s EMA calculation uses for bars before the start of the graph.This is because unlike other moving averages, which reference the price of previous bars, the EMA references the EMA of previous bars. Therefore, bars closer to the beginning of the chart, where TradingView can’t calculate an EMA because there is no previous EMA and therefore uses 0, will return substantially different values for the EMA () function that the same cart would with more history.The further a bar is back in history, the less influence it has. However, every single historical bar has some influence on the EMA of every later bar.To allow you to see this for yourself, this script contains the following inputs which you can change to see the effect: -EMA period (default 89) -Number of bars to ignore for EMA2 (default 89) -decimal precision to show differences in. By making this a large number you can see that, although the effects diminish, history length affects all EMA values for the char. -label spacing (increase this if you have a long history and run into TV’s 50-label limit) Mike Kupietz , a reluctant scion of the postmodern age, is larger on the inside than the outside: perhaps not a composer, but a producer and arranger of sounds; nor a writer, but an avid writer-down; an occasional author of doggerel; an erstwhile urban hermit; and privately a man of very great ardor. He is, if now resigned to never succeeding at those personal and artistic pursuits he holds most dear, unwavering in his determination to fail at them as entertainingly as possible. He is currently in what he calls the "red bathrobe period" of his life. If you're wondering what all this has to do with FileMaker development or IT consulting: you done taken the wrong turn, this river don't go to Aintry—Mike's professional services are on his San Francisco FileMaker Pro consulting website. View All PostsPost navigationPrevious Post Reminder Message (w/ color picker demo)Next PostAP Risk Management Assistant 20-02-25.01 shared alpha