Help fixing EA and adding horizontal line

작업 종료됨

실행 시간 27 일

명시

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.

파일:

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

응답함

1
개발자 1
등급
프로젝트
0
0%
중재
1
0% / 100%
기한 초과
0
무료
2
개발자 2
등급
(292)
프로젝트
364
30%
중재
37
27% / 65%
기한 초과
10
3%
로드됨
게재됨: 10 코드
3
개발자 3
등급
(152)
프로젝트
228
80%
중재
22
27% / 50%
기한 초과
11
5%
무료
게재됨: 24 기고글, 1882 코드
4
개발자 4
등급
(31)
프로젝트
41
20%
중재
9
11% / 89%
기한 초과
5
12%
무료
5
개발자 5
등급
(19)
프로젝트
22
23%
중재
5
40% / 60%
기한 초과
2
9%
작업중
6
개발자 6
등급
(45)
프로젝트
46
24%
중재
34
9% / 85%
기한 초과
10
22%
무료
7
개발자 7
등급
(3)
프로젝트
1
0%
중재
5
0% / 100%
기한 초과
0
무료
8
개발자 8
등급
(78)
프로젝트
247
74%
중재
7
100% / 0%
기한 초과
1
0%
무료
게재됨: 2 기고글, 1 코드
9
개발자 9
등급
(240)
프로젝트
251
78%
중재
0
기한 초과
0
무료
10
개발자 10
등급
(27)
프로젝트
27
26%
중재
2
0% / 50%
기한 초과
1
4%
무료
11
개발자 11
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
게재됨: 9 코드
비슷한 주문
MarketMind Breakout Pro XAUUSD H1 — Donchian Breakout EA Project type: Personal EA development and backtesting Platform: MetaTrader 5 Instrument: XAUUSD Timeframe: H1 Strategy: Donchian Channel breakout with EMA 200 Project overview This project evaluates a Donchian breakout trading strategy for XAUUSD on the H1 timeframe. The system uses channel-based breakout conditions and an EMA 200 trend filter. Historical
Project Title: Development of a Custom Breakout Expert Advisor (EA) with Dynamic Trailing Stop and On-Screen Dashboard for MT5 Project Description: Overview: I am looking for an experienced MQL5 developer to build a fully automated Trading Robot (Expert Advisor) for MetaTrader 5 based on a pending orders breakout strategy with strict dynamic risk management. The EA must be highly optimized, bug-free, and follow the
Trading bot ea 30+ USD
yoo i want to make a trading bot i have my strategy in videos and also the rules to if anyone can work it out for me i will be glad welcome your bid and it urget let connect here on mgl5 And if you know you can not do the project without getting paid first please don't bid thanks

프로젝트 정보

예산
30+ USD
기한
에서 1 로 7 일