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. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية