Download MetaTrader 5

order send error 130 on setting 30 pips stoploss and trailing stop

To add comments, please log in or register
How to launch your trading signal and become a provider
Kiran Chandekar
1472
Kiran Chandekar 2013.11.20 15:26 
I am getting order send error 130. If I try this on demo server of mt4 it works. But if I test in real account of broker instaforex it does not work. What could be the reason.
Files:
whroeder1
14514
whroeder1 2013.11.20 16:02  
  1. //| This MQL is generated by Expert Advisor Builder                  |
    
    https://www.mql5.com/en/forum/139865 we hate EA builder. It generates bad code. You haven't learned the language so there is no common language to communicate with you. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  2.    Total = OrdersTotal();
    Incompatible with every other EA (including itself on other charts) and manual trading
  3.                OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen);
    
    What are Function return values ? How do I use them ? - MQL4 forum
  4. Not adjusting for 4/5 digit brokers
    extern int StopLoss = 50;
    extern int Slippage = 3;
    5 pip SL. and 0.3 pip slippage.

  5. extern double Lots = 5;
    
    What is the maximum lot size allowed by your broker?
Kiran Chandekar
1472
Kiran Chandekar 2013.11.20 17:00  

I know that if the code is working in mql4 demo server . It should work on my broker. It seems broker has some restriction while entering order with stoploss. If I change my stoploss to 50 from 30 then EA is working fine.

Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2013.11.20 17:11  
kcfve123:

I know that if the code is working in mql4 demo server . It should work on my broker. It seems broker has some restriction while entering order with stoploss. If I change my stoploss to 50 from 30 then EA is working fine.

You need you code to check that the Order you are about to send complies with this: Requirements and Limitations in Making Trades
To add comments, please log in or register