Scripts: s-LastPinkEventDate

 

s-LastPinkEventDate:

Since build 344 of the client terminal display of economic calendar news using special graphical objects (OBJ_EVENT) is added.

A script that outputs as a demonstration of the Economic Calendar with current economic data, the date of the last major(Pink) event.

Author: Alexander P.

s-LastPinkEventDate

 

Hello!

Could you tell me if news should be manually placed on the chart every week or is it possible to do it automatically(ObjectCreate...) ?

[Deleted]  
[Deleted]  

Be careful with

void OnDeinit(const int reason)
{
ObjectsDeleteAll(0); // Thoroughо
}

Deleted all special graphic objects (OBJ_EVENT).

[Deleted]  

Used for example.

Deletes all objects except (OBJ_EVENT).

void OnDeinit(const int reason)
{
ObjectsDeleteAllExcept(109);
}


void ObjectsDeleteAllExcept(int type)
  {
   string  name="";
   int total=ObjectsTotal(0)-1;

   for(int i=total; i>=0; i --)
     {
      name=ObjectName(0,i);

      if(ObjectGetInteger(0,name,OBJPROP_TYPE,0)  ==  type) continue; //Objekt Typ muss eine event sein
         ObjectDelete(0,name);
           }
      }
  
[Deleted]  

Be careful with

void OnDeinit(const int reason)
{
ObjectsDeleteAll(0); // Caution
}

Deleted all special graphical objects (OBJ_EVENT).

 

 

Used for example. Removes all objects except (OBJ_EVENT).

void OnDeinit(const int reason)
{
ObjectsDeleteAllExcept(109);
}

 

void ObjectsDeleteAllExcept(int type)
  {
   string  name="";
   int total=ObjectsTotal(0)-1;

   for(int i=total; i>=0; i --)
     {
      name=ObjectName(0,i);

      if(ObjectGetInteger(0,name,OBJPROP_TYPE,0)  ==  type) continue; //Objekt Typ muss eine event sein
         ObjectDelete(0,name);
           } 
  }