Invalid Price Error

 

Halo guys pls help my english is not too good but i new to trading and to code. i want to make simple code like this but i get invalid price inside the error

int start()
{
    double price1= Bid()-Ask();  // An price value

    // Attempt to open a pending order 
    int ticket = OrderSend(Symbol(), OP_BUYSTOP, 1.0, price1= , 2, 0, 0, "", 0, clrNONE);

    if (ticket < 0)
    {
        int error = GetLastError();
        Print("Error Code: ", error);
    }

    return (0);
}
 
Your topic has been moved to the section: MQL4 and MetaTrader 4 — Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 

Do not post code that will not even compile.

There is no Bid function. There is no Ask function.

price1= ,
That is nonsense.