Can anyone tell what I'm doing wrong?
nothing
if you manage to open a limit order,
there is no way to open a stop orders
and vice versa
and of course you gonna get error 130
If I can manually place Buy and / or Sell Limit orders above and below the Ask and Bid respectively, at the same time; how is it that, I can't place them the same way, with an EA?
Thanks!
Yellowbeard:
a stop order was actually a type of limit order,
absolutely not the same
A buy–limit order can only be executed at the limit price or lower. For example, if an investor wants to buy a stock, but doesn't want to pay more than $20 for it, the investor can place a limit order to buy the stock at $20. By entering a limit order rather than a market order, the investor will not buy the stock at a higher price, but, may get fewer shares than he wants or not get the stock at all.
A sell–limit order is analogous; it can only be executed at the limit price or higher.
Both buy and sell orders can be additionally constrained. Two of the most common additional constraints are fill or kill (FOK) and all or none (AON). FOK orders are either filled completely on the first attempt or canceled outright, while AON orders stipulate that the order must be filled with the entire number of shares specified, or not filled at all. If it is not filled, it is still held on the order book for later execution.
A sell–stop order is an instruction to sell at the best available price after the price goes below the stop price. A sell–stop price is always below the current market price. For example, if an investor holds a stock currently valued at $50 and is worried that the value may drop, he/she can place a sell–stop order at $40. If the share price drops to $40, the broker sells the stock at the next available price. This can limit the investor's losses (if the stop price is at or above the purchase price) or lock in some of the investor's profits.
A buy–stop order is typically used to limit a loss (or to protect an existing profit) on a short sale. A buy-stop price is always above the current market price. For example, if an investor sells a stock short—hoping for the stock price to go down so they can return the borrowed shares at a lower price (i.e., covering)—the investor may use a buy stop order to protect against losses if the price goes too high. It can also be used to advantage in a declining market when you want to enter a long position close to the bottom after turnaround.
Yellowbeard: I've managed to open Buy and Sell Limit orders but not Buy and Sell Stop orders. Can anyone tell what I'm doing wrong?
double M=(Bid+0.00001); // BUY Limit Price double Nx=(Ask-0.00001); // SELL Limit Price double MS=(Ask-0.00001); // SELL Stop Price double NS=(Bid+0.00001); // BUY Stop Price |
|
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I've managed to open Buy and Sell Limit orders but not Buy and Sell Stop orders. Can anyone tell what I'm doing wrong?
Thanks!