Currency Strength Algorithm

MQL5 Esperti

Lavoro terminato

Tempo di esecuzione 20 ore
Feedback del cliente
I hired Navdeep to help me work on a personal project where my ability with MQL5 was lacking. He completed the job within a few hours and helped me with numerous questions after the handover
Feedback del dipendente
Happy to help

Specifiche

Hello,

I have developed a strategy but I'm struggling to write the MQL5 code and it's easier for me to get some help rather than continue struggling.

I will explain the part of the strategy I need help with in basic code but I need help writing this in MQL5 as 1. I can't figure out how to calculate the moving average of a source that isnt OHLC, and 2. I cant think how to store that as an array. I have commented the sections below:


lookback_period = 50

//------ Get RSI Values for all 28 Pairs

double audcad = rsi("AUDCAD",lookback_period)
double audchf = rsi("AUDCHF",lookback_period)
double audjpy = rsi("AUDJPY",lookback_period)
double audnzd = rsi("AUDNZD",lookback_period)
double audusd = rsi("AUDUSD",lookback_period)
double cadchf = rsi("CADCHF",lookback_period)
double cadjpy = rsi("CADJPY",lookback_period)
double chfjpy = rsi("CHFJPY",lookback_period)
double euraud = rsi("EURAUD",lookback_period)
double eurcad = rsi("EURCAD",lookback_period)
double eurchf = rsi("EURCHF",lookback_period)
double eurgbp = rsi("EURGBP",lookback_period)
double eurjpy = rsi("EURJPY",lookback_period)
double eurnzd = rsi("EURNZD",lookback_period)
double eurusd = rsi("EURUSD",lookback_period)
double gbpaud = rsi("GBPAUD",lookback_period)
double gbpcad = rsi("GBPCAD",lookback_period)
double gbpchf = rsi("GBPCHF",lookback_period)
double gbpjpy = rsi("GBPJPY",lookback_period)
double gbpnzd = rsi("GBPNZD",lookback_period)
double gbpusd = rsi("GBPUSD",lookback_period)
double nzdcad = rsi("NZDCAD",lookback_period)
double nzdchf = rsi("NZDCHF",lookback_period)
double nzdjpy = rsi("NZDJPY",lookback_period)
double nzdusd = rsi("NZDUSD",lookback_period)
double usdcad = rsi("USDCAD",lookback_period)
double usdchf = rsi("USDCHF",lookback_period)
double usdjpy = rsi("USDJPY",lookback_period)

//----- Find Individual Currency Strength

double aud = (audcad+audchf+(100-euraud)+(100-gbpaud)+audjpy+audnzd+audusd)/7;
double cad = ((100-audcad)+cadchf+(100-eurcad)+(100-gbpcad)+cadjpy+(100-nzdcad)+(100-usdcad))/7;
double chf = ((100-audchf)+(100-cadchf)+(100-eurchf)+(100-gbpchf)+chfjpy+(100-nzdchf)+(100-usdchf))/7;
double eur = (euraud,eurcad+eurchf+eurgbp+eurjpy+eurnzd+eurusd)/7;
double gbp = (gbpaud,gbpcad+gbpchf+(100-eurgbp)+gbpjpy+gbpnzd+gbpusd)/7;
double jpy = ((100-audjpy)+(100-cadjpy)+(100-chfjpy),(100-eurjpy)+(100-gbpjpy)+(100-nzdjpy)+(100-usdjpy))/7;
double nzd = ((100-audnzd)+nzdcad+nzdchf+(100-eurnzd)+(100-gbpnzd)+nzdjpy+nzdusd)/7;
double usd = ((100-audusd)+usdcad+usdchf+(100-eurusd)+(100-gbpusd)+usdjpy+(100-nzdusd))/7;



//---- Now I need a function to take one of the individual currency strengths and calculate 2 moving averages, subtracting the smaller moving average from the larger one. The problem is 1. finding the moving average of a source that isnt OHLC, and 2. storing that as an array to be able to identify crossovers etc:

int signal(double data_currency)
{
        int signal_output = 0;

        delta[] = ema(data_currency,50) - ema(data_currency,200) // This needs to be an array so that I can calculate when delta crosses above or below 0. This is the entry criteria
        
        if(delta[0] > 0 && delta[1] < 0) //delta crosses above 0
                signal_output = 1;

        if(delta[0] < 0 && delta[1]) > 0 //delta below above 0
                signal_output = -1;

        return(signal_output);
}
    


This should be a simple fix for someone who knows the solution!


Con risposta

1
Sviluppatore 1
Valutazioni
(322)
Progetti
499
67%
Arbitraggio
5
40% / 0%
In ritardo
4
1%
Gratuito
Pubblicati: 8 codici
2
Sviluppatore 2
Valutazioni
(5)
Progetti
7
29%
Arbitraggio
0
In ritardo
0
Gratuito
Ordini simili
أحتاج إلى مبرمج محترف لبرمجة اكسبيرت تداول آلي لمنصة MetaTrader 5 يعمل على زوج الذهب XAUUSD فريم الدقيقة. الاستراتيجية المطلوبة: الدخول شراء عند تقاطع المتوسط المتحرك 10 مع 50 صعوداً + مؤشر RSI فوق مستوى 50. الدخول بيع عند التقاطع هبوطاً + مؤشر RSI تحت مستوى 50. إدارة رأس المال: اللوت 0.01 لكل 1000 دولار، وقف خسارة 100 نقطة، هدف ربح 200 نقطة، مع تريلنق ستوب يبدأ بعد 50 نقطة ربح. المطلوب: تسليم الكود مفتوح المصدر مع
Looking for experience profitable manual traders that will be willing to trade my live mt5 account for profit share. Requirements Must have at least 6 months of profitable months. Min 10 percent monthly Send me investor credentials for mt5 or mt4 account. Can be trading Any instruments. Must reply with mt5 credentials or will disregard
XAUUSD_Strategy_EA 80 - 120 USD
I need an MT5 Expert Advisor for XAUUSD. Strategy: BUY conditions: Price above EMA 50 RSI above 50 Recent high breakout Retest confirmation candle bullish SELL conditions: Price below EMA 50 RSI below 50 Recent low breakout Retest confirmation candle bearish Risk management: Risk per trade 1% Stop loss = recent swing high/low Take profit = Risk Reward 1:2 Extra features: Trailing stop option Breakeven option Max 4
more detailed requirements 1 Expert in MQL5, who can build with supertrend formula which can calculate the target time. For instance:When there is buy and sell in supertrend ,our target is of 20 points, that method should calculate the target with time
Hello i am looking for a profitable gold MT5 indicator that shows entry zones. Send trial when applying. Also provide screenshots. The indicator should give buy/sell entry points with SL and TP
Am looking for good programmer to help me to convert two Ex4 file into EA. The first indicator provide 9 tools signal and the second indicator is Candle stick strategy. Kindly see the attached file for proper explanation about the BOT. Below is discription 🔹 PART 1: Candle Structure Strategy (Daily / Weekly / Monthly) ✅ Core Idea You are trading alignment of higher timeframe direction with lower timeframe
Project Overview: I am looking for a professional MQL5 developer to build a high-performance Expert Advisor (EA) for MT5. The project requires high-level technical skills in integrating external indicators and managing complex trade exits. General Requirements: 1. Integration with external indicators via Buffers (iCustom). 2. Implementation of an advanced 5-Tier Trailing system based on Money/Points. 3. Custom Visual
Ihy 30 - 500 USD
Hello, I am looking for access to MT5 trading accounts connected to the market, either demo or live, for the purpose of monitoring and verifying trading performance. Investor (read-only) password access is sufficient, as I only need to log in through MetaTrader 5 to review trade history, risk management, and consistency of results over time. Kindly provide the necessary login details for any available accounts that
OFFICIAL MQL5 SOFTWARE REQUIREMENTS SPECIFICATION (SRS) Project Name: "Quantum-Shield 2.0" Institutional EA Platform: MetaTrader 5 (MT5) Execution Logic: Fully Automated Instrument: GER40 (DAX) Timeframe: 10 Minutes 1. ARCHITECTURAL MANDATE The Expert Advisor must be a monolithic, high-performance C++ based MQL5 application. No DLLs, no external python bridges. The logic must be entirely self-contained. 2. SIGNAL
Hi All, I am looking for an EA which I have attached the video of. It places a buy stop and sell stop with 250 pips above and below current price for every minute with SL as 300 pips and TP as 500 pips. If any of of them triggers in the minute other will be cancelled, it will not place any pending orders till either of SL or TP is hit and places new set of pending orders the very next minute of SL or TP hit minute

Informazioni sul progetto

Budget
30+ USD
Scadenze
da 1 a 2 giorno(i)