Hello,
I have made this program, but somehow I can't see my orders being executed, nor the alerts being triggered when the price has moved by 10 pips :
Please read the documentation: OrderSend()
Please read and implement this: What are Function return values ? How do I use them ?
Hello,
I have made this program, but somehow I can't see my orders being executed, nor the alerts being triggered when the price has moved by 10 pips :
// check for long position (BUY) possibility if(MacdCurrent<0 && MacdCurrent>SignalCurrent && MacdPrevious<SignalPrevious && MathAbs(MacdCurrent)>(MACDOpenLevel*Point) && MaCurrent>MaPrevious) { ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"macd sample",16384,0,Green); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice()); } else Print("Error opening BUY order : ",GetLastError()); return(0); }
Do you know that you get two examples of EA's the moment you get MT4
MACD Sample and Moving Average
this code comes from MACD Sample
do some testing with those programs
read the comment of RaptorUK open the links he is giving
might you see and understand what function ticket has inside MACD Sample
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have made this program, but somehow I can't see my orders being executed, nor the alerts being triggered when the price has moved by 10 pips :