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);
anthor:
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 ?
RaptorUK:
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);
RaptorUK:
Well ?
Well ?
ya..my broker is ECN broker
Well follow the link, read, learn, change your code and be happy. If you need it doing for you go here and pay: MT4 & MT5 coding
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? =)
anthor:
is this correct =)
is this correct =)
What is the point asking for help when you totally ignore the help you are given . . .
RaptorUK:
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.
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
2012.11.08 17:13:37 2011.10.07 14:09 Bar GBPUSD,H1: OrderSend error 130
what is the problem guy????