Creating a buffer for Main symbol and Secondary symbol

To add comments, please log in or register
Digitals113
312
Digitals113  

I am trying to create a buffer in the FFC indicator that pulls the symbol for the upcoming news events.

line 196-201

//--- Buffers
double MinuteBuffer[];
double ImpactBuffer[];
double PreviousBuffer[];
double ForecastBuffer[];
string CountryBuffer[];

line 218-225
//--- indicator buffers mapping
   SetIndexBuffer(0,MinuteBuffer);
   SetIndexBuffer(1,ImpactBuffer);
   SetIndexBuffer(2,ForecastBuffer);
   SetIndexBuffer(3,PreviousBuffer);
   SetIndexBuffer(4,CountryBuffer);
   SetIndexStyle(0,DRAW_NONE);
   SetIndexStyle(1,DRAW_NONE);

line 384-393

      //--- Remove the event after x minutes
      if(EventMinute+EventDisplay<0) continue;
      //--- Set buffers
      MinuteBuffer[index]=EventMinute;
      ImpactBuffer[index]=ImpactToNumber(Event[index][IMPACT]);
      PreviousBuffer[index]=(double)(Event[index][PREVIOUS]);
      ForecastBuffer[index]=(double)(Event[index][FORECAST]);
      CountryBuffer[index]=(string)(Event[index][COUNTRY]);
      index++;
     }

The error I am getting from this code is SetIndexBuffer - no one of the overloads can be applied to the function call.

This is due to the fact that 

string CountryBuffer[];

Is not a double value but this needs to be a string. How can I get around this or be able to make the symbol a buffer?

I have attached the FFC file and included the added code.


Thank you for your assistance on this.

Files:
FFC.mq4 71 kb
William Roeder
20207
William Roeder  
Digitals113: How can I get around this or be able to make the symbol a buffer?
  1. You don't. Buffers are always a double.

  2. Perhaps create text objects
              OBJ_TEXT - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference

  3. Don't double post! You already had this thread open.
              General rules and best pratices of the Forum. - General - MQL5 programming forum

Keith Watford
Moderator
20313
Keith Watford  
Digitals113:

Your duplicated post has been deleted.

To add comments, please log in or register