Problem with variables not created - page 2

 
You have to add the URL used in WebRequest to the list of the Allowed URLs.
 
string GrabWeb()
{
   Print("GrabWeb() called");
   string cookie=NULL,headers;
   char post[],result[];
   int res;
   ResetLastError();
   res=WebRequest("GET",URL,cookie,NULL,5000,post,0,result,headers);
   if(res==-1)Print(ErrorDescription(GetLastError()));
   printf("WebRequest=%i result=%s",res,CharArrayToString(result));
   return(CharArrayToString(result));
}
Frenchytrader:

Why datetime? it's should be value... so double???

No, not for GlobalVariableSet() - when in doubt, check the documentation https://docs.mql4.com/globals/globalvariableset

GlobalVariableSet - Global Variables of the Terminal - MQL4 Reference
GlobalVariableSet - Global Variables of the Terminal - MQL4 Reference
  • docs.mql4.com
GlobalVariableSet - Global Variables of the Terminal - MQL4 Reference
 
printf("WebRequest=%i result=%s",res,CharArrayToString(result));



2017.02.14 13:12:04.814    My-Indicator_EA_v5 EURUSD,H1: initialized
2017.02.14 13:12:04.736    My-Indicator_EA_v5 EURUSD,H1: Outlook has been refreshed!
2017.02.14 13:12:04.736    My-Indicator_EA_v5 EURUSD,H1: WebRequest=-1 result=
2017.02.14 13:12:04.736    My-Indicator_EA_v5 EURUSD,H1: function is not confirmed
2017.02.14 13:12:04.736    My-Indicator_EA_v5 EURUSD,H1: GrabWeb() called
2017.02.14 13:12:04.733    My-Indicator_EA_v5 EURUSD,H1: EA account verified
2017.02.14 13:12:04.660    Expert My-Indicator_EA_v5 EURUSD,H1: loaded successfully


I have added the url into expert tab:
Files:
 
Frenchytrader:

2017.02.14 13:12:04.814    My-Indicator_EA_v5 EURUSD,H1: initialized
2017.02.14 13:12:04.736    My-Indicator_EA_v5 EURUSD,H1: Outlook has been refreshed!
2017.02.14 13:12:04.736    My-Indicator_EA_v5 EURUSD,H1: WebRequest=-1 result=
2017.02.14 13:12:04.736    My-Indicator_EA_v5 EURUSD,H1: function is not confirmed
2017.02.14 13:12:04.736    My-Indicator_EA_v5 EURUSD,H1: GrabWeb() called
2017.02.14 13:12:04.733    My-Indicator_EA_v5 EURUSD,H1: EA account verified
2017.02.14 13:12:04.660    Expert My-Indicator_EA_v5 EURUSD,H1: loaded successfully


I have added the url into expert tab:

There is your issue - that is an error code (4060):

Get rid of the "s" in https i.e. 

http://www.myfxbook.com/

 

Edit - could have saved a lot of time. I've just re-read your first post more carefully:

Frenchytrader:
Also it prints: Function is not confirmed.


 

 
A bit hard to understand for me:

https://docs.mql4.com/common/webrequest
WebRequest - Common Functions - MQL4 Reference
WebRequest - Common Functions - MQL4 Reference
  • docs.mql4.com
WebRequest - Common Functions - MQL4 Reference
 
Frenchytrader:
A bit hard to understand for me:

https://docs.mql4.com/common/webrequest
See my post above. Your URL is wrong
 
honest_knave:

There is your issue - that is an error code (4060):

Get rid of the "s" in https i.e. 

http://www.myfxbook.com/


 

It works without "s"

 : )



Edit:

Why at work it must work without "s" and it works at home with "s" ???

I should I put both url to be 100% fine???

Thank you very much.
 
Frenchytrader:
It works without "s"

 : )



Thank you very much.

Note to self: I should read the first post more carefully next time 

Glad you got it sorted! 

 
honest_knave:
Note to self: I should read the first post more carefully next time 
No worries,



 I have edited last comment.
 
Frenchytrader:
It works without "s"

 : )



Edit:

Why at work it must work without "s" and it works at home with "s" ???

I should I put both url to be 100% fine???

Thank you very much.

Perhaps double-check when you get home the setting. 

They should be an exact match.

Reason: