You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
we have notices that when you remove StopLossLevel and TakeProfitLevel the error will go back to
10021
TRADE_RETCODE_PRICE_OFF
There are no quotes to process the request
then when you finally remove "Bid" from the parameters the code will work and execute a buy order
the only thing wrong with this is that there is obviously no stop loss, take profit or execution price where:
bool Buy( double volume, // position volume
const string symbol=NULL, // symbol double
price=0.0, // execution price
double sl=0.0, // stop loss price
double tp=0.0, // take profit price
const string comment=" " // comment )
my guess is that it does not like the variable bid, even though it works for other purposes and this is causing it to effect
the stop loss and take profit variable values which there causing the error 10016
10016
TRADE_RETCODE_INVALID_STOPS
Invalid stops in the request
WORKING NOW!
dont know how but its working now ?!!!
Corrected version: