WebRequest() cannot be executed in the Strategy Tester.... or can it?

 

I'm running a strategy in the tester where certain actions is supposed to call the WebRequest function and send me a Telegram message.

In the MQL Reference manual, it clearly states " WebRequest () cannot be executed in the Strategy Tester" on both MQL4.com documents and the offline manual,

 so I fully expected to not receive any messages as its not integral to my core strategy anyways.

Much to my surprise, I am receiving Telegram messages from my Strategy Tester!

I'm assuming MT4 got updated to allow this to happen.  Is there a document somewhere that lists these updates?

 
Hoi Cheng:

I'm running a strategy in the tester where certain actions is supposed to call the WebRequest function and send me a Telegram message.

In the MQL Reference manual, it clearly states " WebRequest () cannot be executed in the Strategy Tester" on both MQL4.com documents and the offline manual,

 so I fully expected to not receive any messages as its not integral to my core strategy anyways.

Much to my surprise, I am receiving Telegram messages from my Strategy Tester!

I'm assuming MT4 got updated to allow this to happen.  Is there a document somewhere that lists these updates?

Not possible.
 
Alain Verleyen:
Not possible.

No, the documentation at https://docs.mql4.com/common/webrequest appears to be wrong ("WebRequest() cannot be executed in the Strategy Tester").

I've just tried this, and a WebRequest call is indeed being successfully issued in backtesting.

 
JC:

No, the documentation at https://docs.mql4.com/common/webrequest appears to be wrong ("WebRequest() cannot be executed in the Strategy Tester").

I've just tried this, and a WebRequest call is indeed being successfully issued in backtesting.

What ? MQ is incredible.

Build 1262 ?

That must be a bug.

 
Alain Verleyen:

What ? MQ is incredible.

Build 1262 ?

That must be a bug.

Assuming that it's meant to be something controlled by MT4, rather than a limitation created at compilation time, then it looks as though the documentation has never been accurate. I've gone back as far as MT4 build 1090, and WebRequest works in backtesting in all the builds I've tried. (But haven't recompiled the EA, and so could possibly be something restricted by the compiler in older builds, not MT4 itself.) 

 
JC:

Assuming that it's meant to be something controlled by MT4, rather than a limitation created at compilation time, then it looks as though the documentation has never been accurate. I've gone back as far as MT4 build 1090, and WebRequest works in backtesting in all the builds I've tried. (But haven't recompiled the EA, and so could possibly be something restricted by the compiler in older builds, not MT4 itself.) 

Recompiled and run with build 880, which is nearly 5 years old, and it still seems to work.

 
JC:

Recompiled and run with build 880, which is nearly 5 years old, and it still seems to work.

Ok so we should never trust the documentation and always test all. Great news
 
I am running MT4 version 4.00 build 1260 jan 24 2020, the webrequest() is indeed verified working in the strategy tester!
 

Hi,

I am using WebRequest to make request to a docker container running locally at 127.0.0.1.

It works life, but unfortunately not in Strategy Tester. I was assuming it was a problem of timeout, then I apply visual mode of the strategy tester and slow down the speed, but nothing, still not working.

Would you be so kind to share how you got WebRequest running in Strategy Tester?

I am using MT5. Do youn think it is only possible from MT4?

Thanks,

Marco

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
The idea of ​​automated trading is appealing by the fact that the trading robot can work non-stop for 24 hours a day, seven days a week. The robot does not get tired, doubtful or scared, it's is totally free from any psychological problems. It is sufficient enough to clearly formalize the trading rules and implement them in the algorithms, and...
 

Hi, I checked:


WebRequest() in MT5 does NOT work on Strategy Tester

while

WebRequest() in MT4 DOES work on Strategy Tester


Such a pain the entire platform, IMMO

Marco