(how many times)
int start() { //---- int dig = 1; if (Digits == 5 || Digits == 3) dig = 10; int ticket = OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,NULL,1234,0,Blue); if (ticket > -1) { OrderSelect(ticket, SELECT_BY_TICKET); bool retrn = OrderModify(OrderTicket(), OrderOpenPrice(), Bid-15*Point*dig, Bid+15*Point*dig, 0, Blue); if (retrn == false) Alert("OrderModify() error - ", (GetLastError())); } else { Alert("OrderSend() error - ", (GetLastError())); } //---- return(0); }
int dig = 1; if (Digits == 5 || Digits == 3) dig = 10;How many times: For 5 digit brokers you must adjust TP, SL, and Slippage
double pips2points, // slippage 3 pips 3=points 30=points 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
Hello
I heard FxDialogue has the only excel plug for MT4. You dont need any programing knowledge or to do macros or ask someone for help
I heard FxDialogue has the only excel plug for MT4. You dont need any programing knowledge or to do macros or ask someone for help
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
I am new at this and tried the following from the book and don't know how to fix it. Can someone help please.
EURUSD
//--------------------------------------------------------------------
// simpleopen.mq4
// The code should be used for educational purpose only.
//--------------------------------------------------------------------
int start() // Special function start()
{ // Opening BUY
OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-15*Point,Bid+15*Point);
Alert (GetLastError());
return; // Exit start()
}
//--------------------------------------------------------------------