Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
As the topic suggests, I want to find out how to "skip" a parameter while calling a function.
Being specific, I want to skip the price parameter (thus making the Buy function use default price such as SYMBOL_ASK)
m_Trade.Buy(lots,symbol,price,stoploss,takeprofit,comment);
So there it is, I want to skip the parameter in red, such as follows:
M_Trade.Buy(1,my_symbol,0,50,300,NULL);
If I use 0, the EA doesn't fire up as prices never turns to zero. What value can I use to determine I want to use current price on my Buy function?
Thanks a ton!