Why in the
uint SetBuyLimitOrder ...if(result.retcode==TRADE_RETCODE_DONE)
isn't used
TRADE_RETCODE_PLACED?
ias:
If memory serves me correctly, I wrote these scripts based on code samples from the help, I just copied a code fragment from there and checked it. Everything worked fine and I didn't dwell on it anymore!
Why in the
is not used
?
From the reply:
Rosh2010.09.14 09:322010.09.14 09:32:28 #
...
OrderSend() is intended for sending trade requests to the trade server. What a trade request is - it is a certain trade order:
- to buy or sell immediately on the market (the request can be executed or not depending on the order type and execution conditions for this instrument/order);
- place a pending order to buy or sell on condition (pending Stop and Limit orders) - the order can be placed or rejected;
- cancel a previously placed order to buy or sell on condition (delete pending Stop and Limit orders) - the cancellation order may be executed or rejected due to blocking of the order or an error in the order;
- modify levels of pending orders (Open price, Stop Loss and Take Profit) - an order to modify may be executed or rejected due to blocking of the order or an error in the order;
- modify Stop Loss and Take Profit levels for open positions - the modification order may be executed or rejected due to blocking of the order or an error in the order.
I understood that for (pending Stop and Limit orders) - the order can be placed or rejected - correct-TRADE_RETCODE_PLACED?
to correct:
instead of-//---- Open BUY position and make a check of the result of the trade request
should -//---- Set BuyLimit order and make a check of the result of the trade request
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
SetBuyLimitOrder:
Author: Nikolay Kositsin