Coding issue

 

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.

Reason: