# EMA crossover in Pine Script v6: which lengths to test Slug: ema-crossover-in-pine-script-v6-which-lengths-to-test. Canonical: https://tradingtune.com/blog/ema-crossover-in-pine-script-v6-which-lengths-to-test ## Summary Test EMA crossover lengths as pairs that match your chart timeframe, then check nearby pairs and held-out data. ## Key facts - Choose fast and slow EMA ranges in chart bars, with a clear reason for each range. - Test length pairs together, because the crossover depends on the relationship between the averages. - Keep strategy rules and test conditions fixed while comparing pairs in the same pass. - Check nearby pairs and held-out data before drawing a conclusion about the test. ## Outline - Which EMA lengths are worth testing? (#which-ema-lengths-are-worth-testing) - What does a length mean on your chart? (#what-does-a-length-mean-on-your-chart) - How should a Pine strategy expose the lengths? (#how-should-a-pine-strategy-expose-the-lengths) - Where should the fast and slow ranges start? (#where-should-the-fast-and-slow-ranges-start) - Should the fast and slow ranges overlap? (#should-the-fast-and-slow-ranges-overlap) - How do you compare length pairs by hand? (#how-do-you-compare-length-pairs-by-hand) - What should you keep fixed during the test? (#what-should-you-keep-fixed-during-the-test) - How can nearby pairs help you read the result? (#how-can-nearby-pairs-help-you-read-the-result) - What data should stay outside the search? (#what-data-should-stay-outside-the-search) - When is the length test ready to be repeated? (#when-is-the-length-test-ready-to-be-repeated) - Sources (#sources)