Help fixing EA and adding horizontal line

Lavoro terminato

Tempo di esecuzione 27 giorni

Specifiche

I found a code here, that allows displaying the MQL5 Calendar news in real and backtesting mode as vertical lines, with the news for one currency in one color and the news of the other currency in a different color. However, I am getting an error  ("array out of range ") that I want you to fix.

In addition, I want you to create another function that will draw a horizontal line covering some time before and after a news event.

This function will be called "DisplayNewsWindow" and will take as variables (Currency, EventName, and WindowHours). Say that for the Currency ,  "USD", the EventName "Wholesale Sales m/m" will be on January 10 at 8am, so if I use DisplayNewsWindow ("USD","Wholesale Sales m/m", 2), and horizontal line at the bottom of the chart should appear between 6am and 10 am on that day (i.e., 2hours before and after the news event). The currency name and News event name should appear as tooltip, as you mouse hover the horizontal bar.

I attach the files: "News" is a Class file that saves and updates the list of events in a local computer. "NewsEA" is the EA in which that function is used. You need to create the DisplayNewsWindow function in the News file and use it in the EA.


I think the error is in the fucntion CNews::next2


Ultimately, I want the news events drawn as vertical lines in two colors (one for each currency in a symbol), and some specific news drawn as horizontal lines in the chart, also color coded by currency.

File:

MQH
News.mqh
30.6 Kb
MQ5
NewsEA.mq5
347 b

Con risposta

1
Sviluppatore 1
Valutazioni
Progetti
0
0%
Arbitraggio
1
0% / 100%
In ritardo
0
Gratuito
2
Sviluppatore 2
Valutazioni
(250)
Progetti
313
28%
Arbitraggio
33
27% / 64%
In ritardo
10
3%
In elaborazione
3
Sviluppatore 3
Valutazioni
(152)
Progetti
228
80%
Arbitraggio
22
27% / 50%
In ritardo
11
5%
Gratuito
Pubblicati: 24 articoli, 1882 codici
4
Sviluppatore 4
Valutazioni
(31)
Progetti
41
20%
Arbitraggio
9
11% / 89%
In ritardo
5
12%
Gratuito
5
Sviluppatore 5
Valutazioni
(19)
Progetti
22
23%
Arbitraggio
5
40% / 60%
In ritardo
2
9%
In elaborazione
6
Sviluppatore 6
Valutazioni
(45)
Progetti
46
24%
Arbitraggio
34
9% / 85%
In ritardo
10
22%
Gratuito
7
Sviluppatore 7
Valutazioni
(3)
Progetti
1
0%
Arbitraggio
5
0% / 100%
In ritardo
0
Gratuito
8
Sviluppatore 8
Valutazioni
(77)
Progetti
243
74%
Arbitraggio
7
100% / 0%
In ritardo
1
0%
Gratuito
Pubblicati: 1 articolo
9
Sviluppatore 9
Valutazioni
(209)
Progetti
220
75%
Arbitraggio
0
In ritardo
0
Gratuito
10
Sviluppatore 10
Valutazioni
(27)
Progetti
27
26%
Arbitraggio
2
0% / 50%
In ritardo
1
4%
Gratuito
11
Sviluppatore 11
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 9 codici
Ordini simili
Looking for an experienced MQL5 developer to design and develop a custom Expert Advisor (EA) for MetaTrader 5. The purpose of this EA is not just automated trading, but also to help me better structure, test, and refine my personal trading strategy
Phahla fx boto 30+ USD
99.99% signal accuracy 10-15 trades distribution all currency trade and meta AI assistance on loss[advice] stop and start robot cyber security firewall protection activation code: 20060605TLP20 Please create a trading bot with any logo with the name elevation
Data Integrity 500 - 1000 USD
The trading bot is an automated software system designed to monitor financial markets, execute trades, and manage risk based on predefined strategies. The bot aims to maximize profits while minimizing human intervention and emotional decision-making. Scope: Supports automated trading on selected exchanges (e.g., Binance, Bitget, Coinbase). Executes trades based on technical indicators, signals, or AI models. Provides
ICT_OneTrade_2R 100 - 200 USD
🔥 ICT_OneTrade_2R Precision. Discipline. Consistency. ICT_OneTrade_2R is a professional Expert Advisor designed for traders who value structured execution and controlled risk. This system is built around a fixed Risk-to-Reward ratio of 1:2 (RR 2.0) — meaning every trade is planned with precision: Risk 1 → Target 2. No randomness. No overtrading. Just one high-quality trade per session. ⚙️ Key Features ✔ Fixed RR 1:2
Gold robot Ga1 30 - 200 USD
mport pandas as pd import numpy as np def detecter_tendance(data): # Code pour détecter la tendance pass def identifier_niveaux(data): # Code pour identifier les niveaux de support et de résistance pass def calculer_stop_loss(tendance, support, resistance): # Code pour calculer les stop loss pass def calculer_profils(tendance, support, resistance): # Code pour calculer les profils mport pandas as pd
I need a AI signal generating bot for forex trading that use the latest ai technology to track real time forex market, analyse and give signals. The bot should operate such that when i put it in a chart it will analyse the market, after several minutes it will display whether the trade is buying or selling. It should display the one minute, five minute,15minute, 30 minute, one hour, 4 hours and daily time frame

Informazioni sul progetto

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