Download MetaTrader 5
To add comments, please log in or register
Add our Facebook page to friends. Follow the latest news!
nikoscher
105
nikoscher 2014.09.04 14:20 

Hi there i just wanted to experiment with my "MACD-expert" a bit.

Thats my whole source code:

double MacdCurrent, MacdPrevious, SignalCurrent;
double SignalPrevious, MaCurrent, MaPrevious; 
int init()
{

}

int start()
{
Print("Account balance = ",AccountBalance());
Print("Account balance = ",AccountCurrency()); 
  
MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
MacdPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1);
SignalCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);
SignalPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1);
MaCurrent=iMA(NULL,0,MATrendPeriod,0,MODE_EMA,PRICE_CLOSE,0);
MaPrevious=iMA(NULL,0,MATrendPeriod,0,MODE_EMA,PRICE_CLOSE,1); 
   
Print("MACD CURRENT = ",MacdCurrent);
Print("MACD PREVIOUS = ",MacdPrevious);
Print("SIGNAL CURRENT = ",SignalCurrent);
Print("SIGNAL PREVIOUS = ",SignalPrevious);
Print("MA CURRENT = ",MaCurrent);
Print("MA PREVIOUS = ",MaPrevious);
}

int deinit()
{

}

But every time i compile it there are zero error´s, but when i try to insert this expert in my terminal for testing i get:

"Cannot open file'C:\Program Files\Metatrader 4 Admiral Markets AS\MQL4\Experts\expert.ex4'[2]" 

I use MAC OS and Metatrader 4.

Any suggestions?

I already tried to reinstall, copy and paste code in new file, compile etc...expert.ex4 is still not created!

Could anybody help me?

Greetings!
/
To add comments, please log in or register