Post the code by attaching the MQ4 file
Say what its supposed to do
Say any errors seen
-BB-
OrderSend(Symbol(),OP_BUY,0.1,Bid,5,Bid-(500*Point),NULL);
Buy: Open at the Ask close at the Bid.
Sell: Open at the Bid close at the Ask.
- EA's should adjust for 5 digit brokers, TP, SL, AND slippage. On ECN brokers you must open and THEN set stops
//++++ These are adjusted for 5 digit brokers. int pips2points; // slippage 3 pips 3=points 30=points double pips2dbl; // Stoploss 15 pips 0.0015 0.00150 int Digits.pips; // DoubleToStr(dbl/pips2dbl, Digits.pips) int init(){ if (Digits == 5 || Digits == 3){ // Adjust for five (5) digit brokers. pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0; } // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
T.T Moderator this the code and not works....I not idea what do? Help T.T
Try.....
1.
RefreshRates();
2.
int count = 0;
while ((result == -1) && (count < 10))
{
RefreshRates();
result = OrderSend(...)
count++;
}
3.
OpenPrice = NormalizeDouble(OpenPrice,5);
OrderSend(Symbol(), OP_BUY, 1, OpenPrice,...);
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
RefreshRates();
OrderSend(Symbol(),OP_BUY,0.1,Bid,5,Bid-(500*Point),NULL);
Alert("Error = ",GetLastError());
return(0);
}
//+------------------------------------------------------------------+