Пожалуйста исправьте этот советник, спасибо

 
string FeederTick;
string TraderTick;

void OnTick()
{

  while(IsStopped() == false)
  {
    RefreshRates();
    
    string InpFileName1="";
    string InpFileName2="";
    string InpFileName3="";
    
if(Symbol() == "EURUSD")
{
  
  InpFileName1="status.txt";
  InpFileName2="tick.txt";
  InpFileName3="tick2.txt";
  
  
}
    
    string InpDirectoryName="";
    string path1=InpDirectoryName+"//"+InpFileName1;
    string path2=InpDirectoryName+"//"+InpFileName2;
    string path3=InpDirectoryName+"//"+InpFileName3;
    
    double FeederTickCount = StringToDouble(FeederTick);
    double TraderTickCount = StringToDouble(TraderTick);
    
    int Status = 0;
    
    double ComTick = (FeederTickCount - TraderTickCount) /1000;
    if(ComTick >=1.0) Status = 1;
    
    int handle1 = FileOpen(path1,FILE_WRITE);
    if(handle1 > 0)
    {
      FileWrite(handle1,Status);
      FileClose(handle1);
    }
    
    int handle2 = FileOpen(path2,FILE_READ);
    if(handle2 > 0)
    {
     FeederTick =FileReadString(handle2);
     FileClose(handle2);
    }
    
    int handle3 = FileOpen(path3,FILE_READ);
    if(handle3 > 0)
    {
     TraderTick =FileReadString(handle3);
     FileClose(handle3);
    }
    
    Comment(" Feeder vs Trader = "+ComTick);
    
    Sleep(100);
  }
}


 'RefreshRates' - function not defined
implicit conversion from 'number' to 'string'

Пожалуйста исправьте этот советник, спасибо
    

 
'RefreshRates' - function not defined

Нужно закомментировать строку, в которой есть упоминание о 'RefreshRates'

 

implicit conversion from 'number' to 'string'

Используйте DoubleToString.

 

//+------------------------------------------------------------------+
//|                                                         Test.mq5 |
//|                        Copyright 2016, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "2016, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"
string FeederTick;
string TraderTick;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnTick()
  {
   while(IsStopped()==false)
     {
      //RefreshRates();

      string InpFileName1="";
      string InpFileName2="";
      string InpFileName3="";

      if(Symbol()=="EURUSD")
        {
         InpFileName1="status.txt";
         InpFileName2="tick.txt";
         InpFileName3="tick2.txt";
        }

      string InpDirectoryName="";
      string path1=InpDirectoryName+"//"+InpFileName1;
      string path2=InpDirectoryName+"//"+InpFileName2;
      string path3=InpDirectoryName+"//"+InpFileName3;

      double FeederTickCount = StringToDouble(FeederTick);
      double TraderTickCount = StringToDouble(TraderTick);

      int Status=0;

      double ComTick=(FeederTickCount-TraderTickCount)/1000;
      if(ComTick>=1.0) Status=1;

      int handle1=FileOpen(path1,FILE_WRITE);
      if(handle1>0)
        {
         FileWrite(handle1,Status);
         FileClose(handle1);
        }

      int handle2=FileOpen(path2,FILE_READ);
      if(handle2>0)
        {
         FeederTick=FileReadString(handle2);
         FileClose(handle2);
        }

      int handle3=FileOpen(path3,FILE_READ);
      if(handle3>0)
        {
         TraderTick=FileReadString(handle3);
         FileClose(handle3);
        }

      Comment(" Feeder vs Trader = "+DoubleToString(ComTick,8));

      Sleep(100);
     }
  }
//+------------------------------------------------------------------+

 

И, пожалуйста, вставляйте код правильно: Правильно вставляем код на форуме

 
спасибо
Причина обращения: