OPEN-SOURCE SCRIPT

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

ที่อัปเดต:
STD-Stepped, Variety N-Tuple Moving Averages [Loxx] is the standard deviation stepped/filtered indicator of the following indicator

Variety N-Tuple Moving Averages [Loxx]


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.com/viewtopic.php?f=579496&t=8473244

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


เอกสารเผยแพร่
Limited to 15 so that Pine script doesn't time out. Use the new I posted after this one.
Exponential Moving Average (EMA)qemaStandard DeviationStandard Deviation (Volatility)steppedTriple Exponential Moving Average (TEMA)tuple

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: patreon.com/algxtrading/membership
และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ