loxx

STD-Stepped, Variety N-Tuple Moving Averages [Loxx]

loxx Zaktualizowano   
STD-Stepped, Variety N-Tuple Moving Averages is the standard deviation stepped/filtered indicator of the following indicator


Variety N-Tuple Moving Averages is a moving average indicator that allows you to create 1- 30 tuple moving average types; i.e., Double-MA, Triple-MA, Quadruple-MA, Quintuple-MA, ... N-tuple-MA. This version contains 5 different moving average types including T3. A list of tuples can be found here if you'd like to name the order of the moving average by depth: Tuples extrapolated

STD-Stepped, You'll notice that this is a lot of code and could normally be packed into a single loop in order to extract the N-tuple MA, however due to Pine Script limitations and processing paradigm this is not possible ... yet.

If you choose the EMA option and select a depth of 2, this is the classic DEMA ; EMA with a depth of 3 is the classic TEMA , and so on and so forth this is to help you understand how this indicator works. This version of NTMA is restricted to a maximum depth of 30 or less. Normally this indicator would include 50 depths but I've cut this down to 30 to reduce indicator load time. In the future, I'll create an updated NTMA that allows for more depth levels.

This is considered one of the top ten indicators in forex. You can read more about it here: forex-station.c...m/viewtopic.php?f=579496&a...

How this works

Step 1: Run factorial calculation on the depth value,

Step 2: Calculate weights of nested moving averages

factorial(nemadepth) / (factorial(nemadepth - k) * factorial(k); where nemadepth is the depth and k is the weight position

Examples of coefficient outputs:

6 Depth: 6 15 20 15 6
7 Depth: 7 21 35 35 21 7
8 Depth: 8 28 56 70 56 28 8
9 Depth: 9 36 34 84 126 126 84 36 9
10 Depth: 10 45 120 210 252 210 120 45 10
11 Depth: 11 55 165 330 462 462 330 165 55 11
12 Depth: 12 66 220 495 792 924 792 495 220 66 12
13 Depth: 13 78 286 715 1287 1716 1716 1287 715 286 78 13

Step 3: Apply coefficient to each moving average

For QEMA, which is 5 depth EMA , the caculation is as follows

ema1 = ta. ema ( src , length)
ema2 = ta. ema (ema1, length)
ema3 = ta. ema (ema2, length)
ema4 = ta. ema (ema3, length)
ema5 = ta. ema (ema4, length)

qema = 5 * ema1 - 10 * ema2 + 10 * ema3 - 5 * ema4 + ema5

Included:
  • Alerts
  • Loxx's Expanded Source Types
  • Bar coloring
  • Signals
  • Standard deviation stepping

Informacje o Wersji:
Limited to 15 so that Pine script doesn't time out. Use the new I posted after this one.

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: www.patreon.com/algxtrading/membership
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?