[ad_1]
If you’re getting the Metatrader error: Ordersend Error 130, it may imply a number of various things are going incorrect. First, it’d imply your cease loss is simply too near the market worth. Second, it’d imply your take revenue is simply too near the market worth. And Third, in case you are putting a pending order, you could be making an attempt to position it too near the market worth. What do you have to do?
As a result of there are numerous completely different foreign exchange brokers with completely different account varieties on the market, it’s a must to test the present account’s market data inside your professional advisor to seek out out the minimal cease degree distance you’ve gotten. Some accounts are 3 pips, whereas others could be 15 pips.
The operate you’ll use is named MarketInfo. It requires two parameters, SYMBOL & TYPE. SYMBOL is the foreign money pair or safety you need to entry and TYPE is the request identifier to specify the account data you want to return. Since we’re on the lookout for the minimal cease degree, we are going to use the sort, MODE_STOPLEVEL.
double MarketInfo (string image, int kind)
EXAMPLE:
int MinStopDist = MarketInfo(“EURUSD”,MODE_STOPLEVEL);
After you have this knowledge, you need to be sure you don’t attempt to place cease losses or take earnings nearer than this minimal distance from the market worth. Moreover, you don’t want to attempt to place pending orders nearer than this distance from the present market worth. If you’re utilizing an professional advisor that you just don’t have the supply code for, you’ll want to look within the enter worth settings and see if there’s a cease loss or minimal cease loss setting that you may change.
[ad_2]
Source by Jim Weldon