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
(146)
Progetti
175
23%
Arbitraggio
7
29% / 43%
In ritardo
4
2%
Occupato
3
Sviluppatore 3
Valutazioni
(140)
Progetti
205
80%
Arbitraggio
18
33% / 44%
In ritardo
10
5%
In elaborazione
4
Sviluppatore 4
Valutazioni
(31)
Progetti
41
20%
Arbitraggio
9
11% / 89%
In ritardo
5
12%
Gratuito
5
Sviluppatore 5
Valutazioni
(17)
Progetti
19
26%
Arbitraggio
3
67% / 33%
In ritardo
2
11%
In elaborazione
6
Sviluppatore 6
Valutazioni
(38)
Progetti
40
25%
Arbitraggio
23
13% / 70%
In ritardo
8
20%
Caricato
7
Sviluppatore 7
Valutazioni
(3)
Progetti
1
0%
Arbitraggio
2
0% / 100%
In ritardo
0
In elaborazione
8
Sviluppatore 8
Valutazioni
(61)
Progetti
187
73%
Arbitraggio
4
100% / 0%
In ritardo
1
1%
In elaborazione
9
Sviluppatore 9
Valutazioni
(81)
Progetti
93
58%
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
Ordini simili
Hft live account 30 - 200 USD
i need a high frequency trading (hft) expert advisor, that can be used to trade on demo and live accounts icmarket and 8cap. The EA has to be highly profitable, giving daily profit. If a test version is available, please send, to foster a faster transaction. like the ones that pass prop firm and demo but adjustment where it work on live with low latency
Hello, i need a robot for gold trading being able to determine a trend or instant changes on a micro scale so its just going to scalp very fast but, for example lets say we have an equity of 500 bucks it needs to take profit at 5 and open a new position and just continiue going like that all day, but i also want it to determine buying opportunities based off of a very wide range of candlestick data of gold the day
CPI ROBOKING 30+ USD
*Strategy: CPI-Based Trading* *Instruments:* XAUUSD (Gold), UsTech100 (Nasdaq 100), USDJPY *CPI Release:* 1. *Higher-than-expected CPI:* - XAUUSD: SELL (Gold prices may drop due to potential rate hike) - UsTech100: SELL (Tech stocks may drop due to potential rate hike) - USDJPY: BUY (USD may strengthen due to potential rate hike) 2. *Meets or lower-than-expected CPI:* - XAUUSD: BUY (Gold prices may rise due
Create mt4 ea 50+ USD
To convert the provided MT4 indicator script into an Expert Advisor (EA) and implement prompt functionality for user input, we need to modify the code to handle external parameters and provide a user-friendly interface. Below is the EA code that incorporates prompts for user inputs
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
Hi Developer, I would like to create the Scalping EA based for Mt4 on the investing.com data https://www.investing.com/currencies/eur-usd-technical EA have timing to adjust time to trade. follow the broker time. From starting time to end time EA have a adjustable Lot size (0.01 incremental to 0.01) EA have a adjustable TP (1pip to 100pip incremental 1pip) EA have a adjustable SL (1pip to 100pip incremental 1pip) EA
Edit MyFxBook Data 30 - 40 USD
Hello Everyone, How do I change data on my MT4 so that on MyFxBook it will be seen differently. Because I got a high Drowdown and some loss, I just simply want to hide this data. Please not from inspect because at the end it will be seen, directly from my MT4
I want to make something automatic which EMA will automatically trade in my account. For this I want to make a simple robot I want to get this made automatically on a simple EMA
Saya memerlukan Expert Advisor berdasarkan sinyal AOX. Itu harus memiliki pemeriksaan dan penanganan kesalahan operasi perdagangan. Kriteria utama pembukaan dan posisi penutupan: ■ arah rata-rata bergerak ■ harga lebih tinggi dari bar sebelumnya. Lot perdagangan adalah parameter masukan
Skarito98 30 - 100 USD
Always stay winning and survive....we all want a better life now this is a chance someone can take,to change their lives for the better.No one is supposed to suffer in this world,we create and invert new things and come up with ideas to solve situations we come across especially when it comes to finance. We all need better things in life and God want good things for us

Informazioni sul progetto

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