error code 130 when executing order send

 

I am new to using this system. Are there any suggestions about the error code 130 when calling the OrderSend function?

Thanks

Jim

Files:
testit.mq4  5 kb
 

Replace

   BuyTakeProfits = mid + TakeProfitPips;
   SellTakeProfits = mid - SellProfitPips;
   SellHedgeProfit = mid - SellPocketStop;
   BuyHedgeProfit =  mid + BuyPocketStop;

to

   BuyTakeProfits = NormalizeDouble((mid + TakeProfitPips),Digits);
   SellTakeProfits = NormalizeDouble((mid - SellProfitPips),Digits);
   SellHedgeProfit = NormalizeDouble((mid - SellPocketStop),Digits);
   BuyHedgeProfit =  NormalizeDouble((mid + BuyPocketStop),Digits);