|
|
@@ -79,10 +79,13 @@ datetime lastNews;
|
|
|
//+------------------------------------------------------------------+
|
|
|
//| |
|
|
|
//+------------------------------------------------------------------+
|
|
|
-void initiateNews() export
|
|
|
+void initiateNews(bool isMaster = false) export
|
|
|
{
|
|
|
lastNews=TimeCurrent();
|
|
|
- updateNews();
|
|
|
+ if(isMaster == true)
|
|
|
+ {
|
|
|
+ updateNews();
|
|
|
+ }
|
|
|
fillNewsStruct();
|
|
|
Print("The Symbol is:",Symbol()," and timeperiod:",Period()," and file name is:"+fileName);
|
|
|
}
|
|
|
@@ -120,6 +123,7 @@ int returnNewsStatus(bool highFlag=true
|
|
|
,int gmt=2
|
|
|
,selectLine sl=0
|
|
|
,string extraSymbol=""
|
|
|
+ ,bool isMaster = false
|
|
|
) export
|
|
|
//+------------------------------------------------------------------+
|
|
|
//| |
|
|
|
@@ -139,7 +143,10 @@ int returnNewsStatus(bool highFlag=true
|
|
|
{
|
|
|
if(TimeDayMQL4(TimeCurrent())!=TimeDayMQL4(lastNews))
|
|
|
{
|
|
|
- updateNews();
|
|
|
+ if(isMaster)
|
|
|
+ {
|
|
|
+ updateNews();
|
|
|
+ }
|
|
|
fillNewsStruct();
|
|
|
lastNews=TimeCurrent();
|
|
|
Print("News Function is calling and updating by "+symbol);
|
|
|
@@ -768,7 +775,6 @@ string returnUpCommingNews(bool highFlag=true,
|
|
|
|
|
|
if(TimeDayMQL4(TimeCurrent())!=TimeDayMQL4(lastNews))
|
|
|
{
|
|
|
- //updateNews();
|
|
|
fillNewsStruct();
|
|
|
lastNews=TimeCurrent();
|
|
|
Print("News Function is calling and updating by "+symbol);
|