Ok I have a piece of code that seems to cause the error OrderSend #130. I've checked the Stop Loss and the Take Profit settings and they should be well away from the minimum distance required if placing one in the order. I even normalized the numbers to make sure they fit the parameters of the site. So my guess is that there must be a problem with the Ask price or the Bid price that it receives and so the server won't accept it.
This is code from the section where it would place a buy order:
Is there something special I should be doing to the Ask to make sure that it fits what the site is looking for when it gets the order? I just assumed that it would get the pricing exactly as the site gave it out.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Ok I have a piece of code that seems to cause the error OrderSend #130. I've checked the Stop Loss and the Take Profit settings and they should be well away from the minimum distance required if placing one in the order. I even normalized the numbers to make sure they fit the parameters of the site. So my guess is that there must be a problem with the Ask price or the Bid price that it receives and so the server won't accept it.
This is code from the section where it would place a buy order:
RefreshRates();
ticket = OrderSend(Symbol(),openType,lots,Ask,Slippage,SL,TP,comment,ExpertMagicNumber,0,Color);
Is there something special I should be doing to the Ask to make sure that it fits what the site is looking for when it gets the order? I just assumed that it would get the pricing exactly as the site gave it out.