Simple EA code gets unmatched data error

 

Brand new to coding and trading.

Two questions: Why doesn't this work?

Would this even potentially be profitable?

   { 
   double DayOpen = iOpen(NULL,PERIOD_D1,1);
   double TakeProfitLevel;
   double StopLossLevel;
   int TakeProfit = 10;
   int StopLoss = 10; 
   TakeProfitLevel = Bid + TakeProfit*Point;   //0.0001
   StopLossLevel = Bid - StopLoss*Point;
   int total = OrdersTotal();
   if (total <= 0  && Bid < DayOpen - StopLossLevel)
   { 
   OrderSend("EURUSD", OP_BUY, 1.0, Ask, 0, StopLossLevel, TakeProfitLevel, "1st Order");
   }
   }
 
   TakeProfitLevel = Bid + TakeProfit*Point;   //0.0001

As Buys are opened at Ask, it is possible that you are trying to set take profit at below the entry price

Reason: