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
498
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
🔹 1. Core features (must have) Multi-account connection: MT5, can run many different brokers with different suffixes Real-time order copy: When the master opens/cuts/edits the order → the follower matches exactly. Low latency (the closer to 0 seconds the better). Customize copy volume: Fixed lot (fixed volume). Proportional lot (by % of capital). Multiplier (multiplier). Copy by order type: Choose to copy Buy/Sell
Pocket option bot 50 - 100 USD
I want a developer that can build a pocket option bot, You can only send application if you are experienced pocket option bot developer The bot should be develop base on my details that I will provided to the person that send application Best Regard
🔹 Job Offer: MQL5 Developer Needed for Prop Firm Challenge MT5 EA (US30 / GER40) I am looking for an experienced MQL5 programmer to build a high-performance trading bot for MT5, designed to pass prop firm challenges with selected providers. The EA should be focused on index trading , specifically US30 (Dow Jones) and GER40 (DAX) . Requirements: Proven expertise in MQL5 and algorithmic trading Development of a fast
Hello, good day to you Developers, I am looking for someone that can deliver on a project with the following requirements: The job I am about to give out will involve "Tradingview" and "cTrader" Tradingview: for analysis, as the Strategy uses one second charts/candles, cTrader: for executing and managing the trades. - For this cBot to work well for the project's aims, SPEED of execution is of upmost importance. - The
Job Description: · I am looking for an experienced MQL4 developer to create a high-speed scalping EA for US30 and DE40. The EA must be optimized for ultra-fast execution and should not rely on any indicators—only price action and pending orders (Buy Stop & Sell Stop). · I have written a complete and detailed documentation outlining the logic, execution flow, risk management, and required settings
The following Logic should be created example entryprice 3000 SL in the beginning 2996 Price reaches Entrpy oint = 3000 nothing happens Price reaches Entry point +NowTrailingSL_value(=2.0) price is then 3002 SL is moved to = 3000.20 ( is 3000+ 0.20) Price reaches Entry point +TopOnNowTrailingStoplossValue(=4.0) price is then 3004 SL is still 3000.20 Nothing happens Price reaches Entry point
I 'm contacting you because I'm currently managing an Excel project that centralizes the results monitoring of my trading accounts and the technical characteristics of my Expert Advisors (EAs) . The current system consists of several linked spreadsheets where : • Trading data is automatically uploaded from FXBlue/CSV • Key metrics are consolidated (Win Rate, Profit Factor, Expectancy, SQN, Drawdown, MAR , etc.) •
Looking for an EA that has been previously tested and can pass prop firm challenges. You will need to demonstrate the EA to showcase true nature. Please only apply if you have a system ready. This can be a previous job you already done for someone or have something in the files
Mthizo trades 30 - 200 USD
- *Currency Pairs*: Major pairs such as EUR/USD, XAU/USD and GBP/USD - *Funding Currency*: South African Rand (ZAR) - *Initial Deposit*: R100 (may require additional deposit for live trading) - *Risk Management*: Basic risk management features, such as stop loss and take profit - *Strategy*: Pre-defined strategy based on Smart Money Concept principles - *Cost*: Approximately R100-R200 (one-time cost or
I am interested in purchasing a ready-made automated EA (Expert Advisor) that is already tested and profitable. My key requirements are: Consistent profits with proven results (backtests and/or live performance) Low to medium risk, not overly aggressive Works on major forex pairs, indices, or gold Ready to use with minimal setup If you have an EA that meets these criteria, please share details, performance records

Informazioni sul progetto

Budget
30+ USD
Per lo sviluppatore
27 USD
Scadenze
da 1 a 2 giorno(i)