prog.c:6:2: error: invalid preprocessing directive #property
#property copyright "2005-2014, MetaQuotes Software Corp."
^~~~~~~~
prog.c:7:2: error: invalid preprocessing directive #property
#property link "http://www.mql4.com"
^~~~~~~~
prog.c:9:6: error: expected ‘;’ before ‘double’
input double TakeProfit =50;
^~~~~~~
;
prog.c:10:6: error: expected ‘;’ before ‘double’
input double Lots =0.1;
^~~~~~~
;
prog.c:11:6: error: expected ‘;’ before ‘double’
input double TrailingStop =30;
^~~~~~~
;
prog.c:12:6: error: expected ‘;’ before ‘double’
input double MACDOpenLevel =3;
^~~~~~~
;
prog.c:13:6: error: expected ‘;’ before ‘double’
input double MACDCloseLevel=2;
^~~~~~~
;
prog.c:14:6: error: expected ‘;’ before ‘int’
input int MATrendPeriod =26;
^~~~
;
prog.c: In function ‘OnTick’:
prog.c:32:7: error: ‘Bars’ undeclared (first use in this function)
if(Bars<100)
^~~~
prog.c:32:7: note: each undeclared identifier is reported only once for each function it appears in
prog.c:34:7: warning: implicit declaration of function ‘Print’ [-Wimplicit-function-declaration]
Print("bars less than 100");
^~~~~
prog.c:43:16: warning: implicit declaration of function ‘iMACD’ [-Wimplicit-function-declaration]
MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
^~~~~
prog.c:43:22: error: ‘NULL’ undeclared (first use in this function)
MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
^~~~
prog.c:43:22: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
prog.c:1:1:
+#include <stddef.h>
//+------------------------------------------------------------------+
prog.c:43:22:
MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
^~~~
prog.c:43:37: error: ‘PRICE_CLOSE’ undeclared (first use in this function)
MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
^~~~~~~~~~~
prog.c:43:49: error: ‘MODE_MAIN’ undeclared (first use in this function)
MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0);
^~~~~~~~~
prog.c:45:51: error: ‘MODE_SIGNAL’ undeclared (first use in this function)
SignalCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0);
^~~~~~~~~~~
prog.c:47:14: warning: implicit declaration of function ‘iMA’ [-Wimplicit-function-declaration]
MaCurrent=iMA(NULL,0,MATrendPeriod,0,MODE_EMA,PRICE_CLOSE,0);
^~~
prog.c:47:41: error: ‘MODE_EMA’ undeclared (first use in this function)
MaCurrent=iMA(NULL,0,MATrendPeriod,0,MODE_EMA,PRICE_CLOSE,0);
^~~~~~~~
prog.c:50:10: warning: implicit declaration of function ‘OrdersTotal’ [-Wimplicit-function-declaration]
total=OrdersTotal();
^~~~~~~~~~~
prog.c:54:10: warning: implicit declaration of function ‘AccountFreeMargin’ [-Wimplicit-function-declaration]
if(AccountFreeMargin()<(1000*Lots))
^~~~~~~~~~~~~~~~~
prog.c:61:10: warning: implicit declaration of function ‘MathAbs’ [-Wimplicit-function-declaration]
MathAbs(MacdCurrent)>(MACDOpenLevel*Point) && MaCurrent>MaPrevious)
^~~~~~~
prog.c:61:46: error: ‘Point’ undeclared (first use in this function); did you mean ‘int’?
MathAbs(MacdCurrent)>(MACDOpenLevel*Point) && MaCurrent>MaPrevious)
^~~~~
int
prog.c:63:17: warning: implicit declaration of function ‘OrderSend’ [-Wimplicit-function-declaration]
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"macd sample",16384,0,Green);
^~~~~~~~~
prog.c:63:27: warning: implicit declaration of function ‘Symbol’ [-Wimplicit-function-declaration]
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"macd sample",16384,0,Green);
^~~~~~
prog.c:63:36: error: ‘OP_BUY’ undeclared (first use in this function)
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"macd sample",16384,0,Green);
^~~~~~
prog.c:63:48: error: ‘Ask’ undeclared (first use in this function)
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"macd sample",16384,0,Green);
^~~
prog.c:63:99: error: ‘Green’ undeclared (first use in this function)
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"macd sample",16384,0,Green);
^~~~~
prog.c:66:16: warning: implicit declaration of function ‘OrderSelect’ [-Wimplicit-function-declaration]
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
^~~~~~~~~~~
prog.c:66:35: error: ‘SELECT_BY_TICKET’ undeclared (first use in this function)
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
^~~~~~~~~~~~~~~~
prog.c:66:52: error: ‘MODE_TRADES’ undeclared (first use in this function)
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
^~~~~~~~~~~
prog.c:67:44: warning: implicit declaration of function ‘OrderOpenPrice’ [-Wimplicit-function-declaration]
Print("BUY order opened : ",OrderOpenPrice());
^~~~~~~~~~~~~~
prog.c:70:48: warning: implicit declaration of function ‘GetLastError’ [-Wimplicit-function-declaration]
Print("Error opening BUY order : ",GetLastError());
^~~~~~~~~~~~
prog.c:77:36: error: ‘OP_SELL’ undeclared (first use in this function)
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"macd sample",16384,0,Red);
^~~~~~~
prog.c:77:49: error: ‘Bid’ undeclared (first use in this function); did you mean ‘void’?
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"macd sample",16384,0,Red);
^~~
void
prog.c:77:100: error: ‘Red’ undeclared (first use in this function)
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"macd sample",16384,0,Red);
^~~
prog.c:92:27: error: ‘SELECT_BY_POS’ undeclared (first use in this function)
if(!OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES))
^~~~~~~~~~~~~
prog.c:94:10: warning: implicit declaration of function ‘OrderType’ [-Wimplicit-function-declaration]
if(OrderType()<=OP_SELL && // check for opened position
^~~~~~~~~
prog.c:95:10: warning: implicit declaration of function ‘OrderSymbol’ [-Wimplicit-function-declaration]
OrderSymbol()==Symbol()) // check for symbol
^~~~~~~~~~~
prog.c:105:20: warning: implicit declaration of function ‘OrderClose’ [-Wimplicit-function-declaration]
if(!OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet))
^~~~~~~~~~
prog.c:105:31: warning: implicit declaration of function ‘OrderTicket’ [-Wimplicit-function-declaration]
if(!OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet))
^~~~~~~~~~~
prog.c:105:45: warning: implicit declaration of function ‘OrderLots’ [-Wimplicit-function-declaration]
if(!OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet))
^~~~~~~~~
prog.c:105:63: error: ‘Violet’ undeclared (first use in this function); did you mean ‘ticket’?
if(!OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet))
^~~~~~
ticket
prog.c:114:22: warning: implicit declaration of function ‘OrderStopLoss’ [-Wimplicit-function-declaration]
if(OrderStopLoss()<Bid-Point*TrailingStop)
^~~~~~~~~~~~~
prog.c:117:26: warning: implicit declaration of function ‘OrderModify’ [-Wimplicit-function-declaration]
if(!OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green))
^~~~~~~~~~~
prog.c:117:92: warning: implicit declaration of function ‘OrderTakeProfit’ [-Wimplicit-function-declaration]
if(!OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green))
^~~~~~~~~~~~~~~