I try to open order with OrderSend function

 

I try to open order with OrderSend function. But it makes error code 136

 

Code that i use 

 

void OnStart()

  {

//---/--- get minimum stop level

  double minstoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL);

   Print("Minimum Stop Level=",minstoplevel," points");

   double price=Ask;

//--- calculated SL and TP prices must be normalized

   double stoploss=NormalizeDouble(Bid-10*Point,Digits);

   double takeprofit=NormalizeDouble(Bid+10*Point,Digits);

   Print("price ", price);

   Print("stoploss ", stoploss);

   Print("takeprof ", takeprofit);

   Print("Ask ",Ask);

   Print("Bid ", Bid);

//--- place market order to buy 1 lot

   int ticket=OrderSend("USDCHF",OP_BUY,1,price,1000,stoploss,takeprofit,"My order",16384,0,clrGreen);

 Print("ticket ", ticket);

   if(ticket<0)

     {

      Print("OrderSend failed with error #",GetLastError());

     }

   else

      Print("OrderSend placed successfully");


  

   

  } 

 

Any assistance will be appriciated 

 

1) use the SRC-button to post code (beside the camera!)

2) Do you know what error 136 means. It tells you where to search for a correction! (Look it up in the MQL4 Reference)

 
It said off quotes. But how to make work this function. I'm very new. Please assist on this issue
 

Read the book or the Documentation (links at the top!).

Look for the examples of opening orders.

Study the sample EAs in the Expert folder how they set their prices for OrderSend(..)

Search for other examples...

 
You are mixing apples and oranges. Ask/Bid are the current chart pair but you are opening a USDCHF pair. Fails if the current chart is not USDCHF
   double price=Ask;
:
// int ticket=OrderSend("USDCHF",OP_BUY,1,price, ...
   int ticket=OrderSend(NULL,    OP_BUY,1,price,