News Trading EA

 

Hi everyone , 

i'm interested in a news trading EA that has pending order strategies and specified trading period in date ,hours and minutes .

I found the one attached below , but it contains many errors and warnings .

Any help will be appreciated . 

Files:
 
asiwajuwilly:

Hi everyone , 

i'm interested in a news trading EA that has pending order strategies and specified trading period in date ,hours and minutes .

I found the one attached below , but it contains many errors and warnings .

Any help will be appreciated . 

Hi

Do you have this mqh file which is an include in the code and if so, where have you saved it (which folder?)

#include <hanover --- function header (np).mqh>
 

Oh and this one:

#include <hanover --- extensible functions (np).mqh>

 

 Also, this block of code is sitting outside of any function block. Should be moved to the declaration section

#include <hanover --- extensible functions (np).mqh>
  
int TotalBuy=0, TotalSell=0;
int TotalBuyStop=0, TotalSellStop=0;
int TicketBuyStop=0, TicketSellStop=0;
 
Filter:

Oh and this one:

 

 Also, this block of code is sitting outside of any function block. Should be moved to the declaration section 

 
asiwajuwilly:

Hi Filter ,

Thanks for your prompt reply to my request , i actually downloaded the 2 files ,that you mentioned above , but i don't know which folder to save them  .

Also , which section is the declaration section?

expecting your helpful reply . Thanks once again . 

 
asiwajuwilly:

Hi Filter ,

Thanks for your prompt reply to my request , i actually downloaded the 2 files ,that you mentioned above , but i don't know which folder to save them  .

Also , which section is the declaration section?

expecting your helpful reply . Thanks once again . 

No problems mate

I'm not at my trading PC so can't tell if there are any further problems with the EA. But I've moved those few lines to where I think they should be and attached the file below.

Place the mqh files in your MT4 experts/include folder.

A couple more things:

  • Make sure you download the MT4 build 600+ compatible mqh files from here
  • There are notes on that page that there may need to be changes made to the files so you may want to have a good read of that page
  • There are also notes on that page that say you may get a bunch of warnings but to ignore them


Hope that helps :)

Cheers
Stu 

Files:
 

Hi Filter ,

thanks for your efforts so far , but the EA is still not working . It refused to  attach to the chart .

Kindly check if something is still wrong with it .  All i can see now is 10 errors and 8 warnings .

Thanks. 

 
asiwajuwilly:

Hi Filter ,

thanks for your efforts so far , but the EA is still not working . It refused to  attach to the chart .

Kindly check if something is still wrong with it .  All i can see now is 10 errors and 8 warnings .

Thanks. 

May have time to look at it later this afternoon for you. In the meantime, can you let me know what the 10 errors are?
 
Filter:
May have time to look at it later this afternoon for you. In the meantime, can you let me know what the 10 errors are?

Below are the errors. 

can't open "C:\Users\williams\AppData\Roaming\MetaQuotes\Terminal\7F3EF561E42815388D4A6200AA5AE4FD\MQL4\include\hanover --- function header (np).mqh" include file NewsTradingEA__1.mq4 10 11
'hanover --- extensible functions (np).mqh' hanover --- extensible functions (np).mqh 1 1
'.' - semicolon expected NewsTradingEA__1.mq4 17 20
return value of 'OrderSend' should be checked NewsTradingEA__1.mq4 145 13
return value of 'OrderSend' should be checked NewsTradingEA__1.mq4 146 13
return value of 'OrderModify' should be checked NewsTradingEA__1.mq4 151 16
return value of 'OrderModify' should be checked NewsTradingEA__1.mq4 152 16
return value of 'OrderDelete' should be checked NewsTradingEA__1.mq4 158 10
return value of 'OrderDelete' should be checked NewsTradingEA__1.mq4 161 10
return value of 'OrderDelete' should be checked NewsTradingEA__1.mq4 167 10
return value of 'OrderDelete' should be checked NewsTradingEA__1.mq4 170 10
'OutputDebugStringA' - function not defined hanover --- extensible functions (np).mqh 429 4
'InternetAttemptConnect' - function not defined hanover --- extensible functions (np).mqh 2160 12
'InternetOpenW' - function not defined hanover --- extensible functions (np).mqh 2164 26
'INTERNET_FLAG_NO_CACHE_WRITE' - undeclared identifier hanover --- extensible functions (np).mqh 2169 18
'INTERNET_FLAG_PRAGMA_NOCACHE' - undeclared identifier hanover --- extensible functions (np).mqh 2169 49
'INTERNET_FLAG_RELOAD' - undeclared identifier hanover --- extensible functions (np).mqh 2169 80
'InternetOpenUrlW' - function not defined hanover --- extensible functions (np).mqh 2170 14
'InternetCloseHandle' - function not defined hanover --- extensible functions (np).mqh 2172 95
'InternetReadFile' - function not defined hanover --- extensible functions (np).mqh 2182 20
'InternetCloseHandle' - function not defined hanover --- extensible functions (np).mqh 2197 3
12 error(s), 8 warning(s) 13 9

 

can't open "C:\Users\williams\AppData\Roaming\MetaQuotes\Terminal\7F3EF561E42815388D4A6200AA5AE4FD\MQL4\include\hanover --- function header (np).mqh" include file NewsTradingEA__1.mq4 10 11
'hanover --- extensible functions (np).mqh' hanover --- extensible functions (np).mqh 1 1

 

Move both of the hanover mqh files to your MQL4\include folder

 

'.' - semicolon expected NewsTradingEA__1.mq4 17 20

Fixed - download new EA below

 

return value of 'OrderSend' should be checked NewsTradingEA__1.mq4 145 13
return value of 'OrderSend' should be checked NewsTradingEA__1.mq4 146 13
return value of 'OrderModify' should be checked NewsTradingEA__1.mq4 151 16
return value of 'OrderModify' should be checked NewsTradingEA__1.mq4 152 16
return value of 'OrderDelete' should be checked NewsTradingEA__1.mq4 158 10
return value of 'OrderDelete' should be checked NewsTradingEA__1.mq4 161 10
return value of 'OrderDelete' should be checked NewsTradingEA__1.mq4 167 10

return value of 'OrderDelete' should be checked NewsTradingEA__1.mq4 170 10

These are just warnings. Need to add a boolean check on all of these - can be done later

 

'OutputDebugStringA' - function not defined hanover --- extensible functions (np).mqh 429 4
'InternetAttemptConnect' - function not defined hanover --- extensible functions (np).mqh 2160 12
'InternetOpenW' - function not defined hanover --- extensible functions (np).mqh 2164 26
'INTERNET_FLAG_NO_CACHE_WRITE' - undeclared identifier hanover --- extensible functions (np).mqh 2169 18
'INTERNET_FLAG_PRAGMA_NOCACHE' - undeclared identifier hanover --- extensible functions (np).mqh 2169 49
'INTERNET_FLAG_RELOAD' - undeclared identifier hanover --- extensible functions (np).mqh 2169 80
'InternetOpenUrlW' - function not defined hanover --- extensible functions (np).mqh 2170 14
'InternetCloseHandle' - function not defined hanover --- extensible functions (np).mqh 2172 95
'InternetReadFile' - function not defined hanover --- extensible functions (np).mqh 2182 20
'InternetCloseHandle' - function not defined hanover --- extensible functions (np).mqh 2197 3

Hopefully these will be fixed when you move the include files to the new location..... 



Files:
 
Filter:

Thank you so much , it's much better now , i have been able to attach it to my 15mins chart  as recommended , and every comment programmed into it is displayed on the screen , but it's not opening trade , though it indicates that it's ready to open 

a trade .

 I will keep testing it for any improvement .

I am very grateful to you . Thank you so much .