OPEN-SOURCE SCRIPT

TEWMA Supertrend - [JTCAPITAL]

255
TEWMA Supertrend is a modified way to use Triple Exponential Weighted Moving Average inside Supertrend logic for Trend-Following

The indicator works by calculating in the following steps:

1. Calculate the Triple Exponential Moving Average with Weighted Moving Average as input.

2. Calculate the ATR over the Supertrend Length

3. Use the Triple Exponential Weighted Moving Average, and add the multiplier times the ATR for the upper limit, and subtract the multiplier times the ATR for the lower limit.

4. Define Buy and Sell conditions based on the price closing above or below the upper and lower limits.


--Buy and sell conditions--

- The buy and sell conditions are defined by the price going above/below the upper and lower limits, calculated by (TEWMA +/- multi * ATR).

- When this goes on the opposite direction of the current trend, the trend changes. If this goes in the same direction of the current trend, the line follows the price by moving up.

- When price gets closer to the limits the limits do not change. The upper limit only moves when the upper decreases, and the lower limit only moves when the lower increases.

- The ATR gets subtracted from the lows or added onto the highs to eliminate false signals in choppy markets, while enforcing fast entries and exits.


--Features and Parameters--

- Allows the usage of different sources
- Allows the changing of the length of the ATR
- Allows the changing of the length of the TEWMA
- Allows the changing of the multiplier to increase or decrease ATR usage


--Details--

This script is using TEWMA as input for the modified Supertrend. Using a TEWMA and getting a higher multiplier to the ATR is meant to decrease false signals. Which can be a problem when using a normal Supertrend. Using the TEWMA also ensures fast entries and exits from fast market moves after a calm period. Ensuring you don't stay left behind.

Be aware that lowering the multiplier for the ATR will allow for faster entries and exits but also allow for more false signals. It is recommended to change the parameters to fit your liking and to adjust to the timeframe you are working on.

Enjoy!

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.