OPEN-SOURCE SCRIPT

Exponantial Spread Strategy

It is strongly recommended to evaluate the strategy's performance on long time frames such as 1D or 4H.

This strategy calculates a custom moving average by the formula EMA+(TEMA-DEMA)*G,
G being the gain parameter. The main idea behind that is since TEMA is much more adaptive than DEMA their spread give us momentum, and incorporating this with a gain allows us to calculate a very responsive but yet not noisy moving average.

We calculate 4 MAs like described with gains 0,1,2,3 from less adaptive (normal EMA) to most adaptive. When they align in terms of position and the price is above the original MA we enter a long position, and do partial exits at each crossunder weighted by how adaptive ma is, the more adaptive the less weight, we do a full stop when the price crossed below under the original MA or the position aligment changed.
Double Exponential Moving Average (DEMA)Exponential Moving Average (EMA)Triple Exponential Moving Average (TEMA)

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности