指定

EA CORRELATION

The EA works with correlation in two assets A and B, for example, EURUSD/GBPUSD, now I need to modify the parameters based on the Spearman formula as an indicator.

PARAMETERS:
ProfitTarget = 10.00;// (Change to including cents)
DistPips = 10 // The distance in pips between aks of A and aks of B (EURUSD-GBPUSD)
Spearman = r>0.8 // Can be modified depending on the trader.
N = 10 // the number of bars that will generate the indicator, that is, for the spearman formula.

PROHIBITED:
If currency A above currency B || DistPips > 10 || Spearman > 0.8, then:
Sell A and buy B – exit ProfitTarget or when DistPips =5.

If currency B above currency A || DistPips > 10 || Spearman > 0.8, then:
Sell B and buy A – exit ProfitTarget or when DistPips =5.



SPEARMAN'S FORMULA:
It follows that in the formula:
Xi = ASK value of asset A, in our EURUSD example;
Yi = ASK Value of Asset B, in our GBPUSD example;
N = period, that is, the number of CANDLES to compare, for example last 10 bars.

Therefore, the indicator will show a number less than 1 that will indicate whether the correlation is strong or weak between the two chosen currencies.

ファイル:

応答済み

1
開発者 1
評価
(11)
プロジェクト
17
59%
仲裁
2
0% / 100%
期限切れ
2
12%
2
開発者 2
評価
(253)
プロジェクト
408
38%
仲裁
86
43% / 19%
期限切れ
70
17%
取り込み中
類似した注文
Desejo criar um site, onde, extraia informações da B³, passe-as pelo algoritmo que eu desenvolvi e, apresente o resultado ao usuário. Ele deve possuir uma página de demonstração para não assinantes e uma página de análise para assinantes. Deve apresentar os 5 melhores e os 5 piores investimentos do mês corrente
//+------------------------------------------------------------------+ //| SimpleEA.mq5| //| Copyright 2023, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "2023, MetaQuotes Software Corp." #property link " https://www.mql5.com " #property version "1.00" #property strict input int FastMAPeriod = 12; // Período da média

プロジェクト情報

予算
30+ USD
開発者用
27 USD