Sergei3939

Correlation Trading Strategy

English description:

Title: Correlation Trading Strategy (CTS)

The Correlation Trading Strategy (CTS) is a unique approach that uses the Pearson correlation coefficient to identify potential trading opportunities between two cryptocurrency pairs. The strategy compares historical price data of two selected cryptocurrencies and calculates the degree of correlation between them.

Inputs:

Lookback Period: The time interval for calculating correlation (e.g., 30, 60, 90 days).
Timeframe Period: The timeframe for the historical price data (e.g., '5').
First Symbol: The first cryptocurrency symbol to compare (e.g., BTCUSD).
Second Symbol: The second cryptocurrency symbol to compare (e.g., ETHUSD).
Enter Long Threshold: The correlation threshold for entering a long position.
Exit Long Threshold: The correlation threshold for exiting a long position.
The strategy enters a long position when the correlation coefficient is equal to or higher than the Enter Long Threshold and exits the position when the correlation coefficient falls below the Exit Long Threshold. The Pearson correlation coefficient ranges from -1 (perfectly negatively correlated) to 1 (perfectly positively correlated), with 0 indicating no correlation. By adjusting the thresholds, traders can customize the strategy to suit their risk appetite and trading style.

Russian description:

Заголовок: Торговая стратегия на основе корреляции (CTS)

Торговая стратегия на основе корреляции (CTS) представляет собой уникальный подход, использующий коэффициент корреляции Пирсона для выявления потенциальных торговых возможностей между двумя парными криптовалютами. Стратегия сравнивает исторические данные о ценах двух выбранных криптовалют и рассчитывает степень корреляции между ними.

Входные параметры:

Период анализа: временной интервал для расчета корреляции (например, 30, 60, 90 дней).
Временной период: временной период для исторических данных о ценах (например, '5').
Первый символ: первый символ криптовалюты для сравнения (например, BTCUSD).
Второй символ: второй символ криптовалюты для сравнения (например, ETHUSD).
Порог для открытия длинной позиции: порог корреляции для открытия длинной позиции.
Порог для закрытия длинной позиции: порог корреляции для закрытия длинной позиции.
Стратегия открывает длинную позицию, когда коэффициент корреляции равен или выше порога для открытия длинной позиции, и закрывает позицию, когда коэффициент корреляции опускается ниже порога для закрытия длинной позиции
Script protégé
Ce script est publié en code source fermé et vous pouvez l'utiliser librement. Vous pouvez le préférer pour l'utiliser sur un graphique. Vous ne pouvez pas visualiser ou modifier son code source.
Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?