Reply

please decompile this ea . Thank you

2 replies

jyw888

Subscriber, bbp_participant, community, 1 replies.

Visit profile

7 years ago #115086

 
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’
 
please decompile this ea . Thank you
 
    
 

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

7 years ago #136775

Sorry, what are you talking about?

0

geektrader

Customer, bbp_participant, community, 522 replies.

Visit profile

7 years ago #136824

He most likely means “fix” instead of “decompile”. Your solution is here: https://forum.mql4.com/67434

 

Simply said: DON`T compile MQH files, they do not need to be compiled as they are just code-libraries for MQ4 files. Just include them in your MQ4 EA to use the functions you need and then compile the MQ4 file, not the MQH, otherwise it won´t work.

 

Apart from this please note: this Forum is not for fixing random MQ4 code, it´s related to StrategyQuant only and only such posts should be made here.


🚀 Unlock Your Edge in Automated Forex Strategy Development 🚀

Historical Forex Data Starting From 1987, 28 Pairs, M1, 99% Error-Free, Lifetime Free Updates

0

Viewing 2 replies - 1 through 2 (of 2 total)