If your MT4 broker uses five digit quotes, you have to multiply slippage, take_profit and stop_loss by 10, e.g.
int slippage = 3*10; double take_profit = MarketInfo(Symbol(),MODE_ASK)+MarketInfo(Symbol(),MODE_POINT)*PipsTP; take_profit = take_profit * 10.0; ticket = OrderSend(Symbol(),1,Size,MarketInfo(Symbol(),MODE_ASK),slippage,0,take_profit,"",Green);
If your MT4 broker uses five digit currency, you have to multiply slippage, take_profit and stop_loss by 10, e.g.
Erm, sometimes can buy and sell with TakeProfit 30 pips, but sometimes can't buy..i have no idea...my currency is GBPUSD and broker is FXCM
2012.11.08 17:13:37 2011.10.07 14:09 Bar GBPUSD,H1: OrderSend error 130
what is the problem guy????
You have already been given advice, why won't you take it ? https://www.mql5.com/en/forum/141678
Is your Broker an ECN type Broker ?
You have already been given advice, why won't you take it ? https://www.mql5.com/en/forum/141678
Is your Broker an ECN type Broker ?
ticket=OrderSend(Symbol(),1,Size,Ask,30,0,(MarketInfo(Symbol(),MODE_ASK)+MarketInfo(Symbol(),MODE_POINT)*PipsTP)*10,"",Green);
Well ?
ya..my broker is ECN broker
int pips2points=3; // slippage 3 pips 3=points 30=points double pips2dbl=30; // Stoploss 15 pips 0.015 0.0150 int Digits.pips; // DoubleToStr(dbl/pips2dbl, Digits.pips) int init() { //---- if (Digits % 2 == 1){ // DE30=1/JPY=3/EURUSD=5 forum.mql4.com/43064#515262 pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0; } //---- return(0); } void OrderSell(double Size) { int ticket=0; while (ticket <= 0) { Print("awiting"); Print("sell="+Bid+"/"+(MarketInfo(Symbol(),MODE_BID)-MarketInfo(Symbol(),MODE_POINT)*PipsTP)); ticket=OrderSend(Symbol(),1,Size,Bid,3* pips2points,0,Bid * pips2dbl,"",Green); Sleep(1000); if(ticket<0) { Print("OrderSend failed with error #",GetLastError()); } } }is this correct? =)
is this correct =)
What is the point asking for help when you totally ignore the help you are given . . .
What is the point asking for help when you totally ignore the help you are given . . .
dude,i have followed the coding...if any mistake..pls advice.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
2012.11.08 17:13:37 2011.10.07 14:09 Bar GBPUSD,H1: OrderSend error 130
what is the problem guy????