
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
That's in terms of overheads. But in terms of arbitrage?
in terms of costs, of course.
you will pay for shorting the stock
That's in terms of overheads. And in terms of arbitrage?
Classic arbitrage, is:
Buying(by no means selling) shares and simultaneously selling stock-size futures.
exp_data.fut_equity = long(exp_data.fut_contr * exp_data.fut_contr_size);
=
exp_data.spot_equity = long(exp_data.spot_lot * exp_data.spot_lot_size);
If you short a stock, Opener will turn on the meter at 23% p.a.But I wonder what will happen if request.action = TRADE_ACTION_PENDING; is replaced by request.action = TRADE_ACTION_DEAL in the Stock structure;
Will the order be executedfaster or not?
Will the order be executedfaster or not?
If you specify the current price from the market, it won't be faster. But slippage may occur. Anyway, I observed it on the demo-openers.
If you are quoting the current price from the cup, I don't think it will go any faster. But slippage can happen. At least, I observed it in the demo mode.
TRADE_ACTION_PENDING - set a trade order for execution of a deal at specified conditions (pending order )
TRADE_ACTION_DEAL - set a trade order for immediate execution of a deal at specified parameters (put a market order)
It seems that TRADE_ACTION_DEAL order should be executed faster.
TRADE_ACTION_PENDING - Place a trade order to execute a trade at specified conditions (pending order )
TRADE_ACTION_DEAL - set a trade order for immediate execution of a deal with specified parameters (put market order)
It seems that TRADE_ACTION_DEAL order should be executed faster.
There is no way to do without an order. Immediate execution means only at the current price. Later, we can get a list of orders by position ID, but the properties will not be all. I do not remember what else is missing right now, but certainly not the price of the order.
Here we have one pending position on the demo. This code
Result
This is not forex...
Added:
Well yeah, I guess I didn't get it right straight away...
In this case you have to understand that if you put a price equal to the best price in the market window into a pending order, it is equivalent to setting a market order.
In this case, it should be understood that if you put a price equal to the best price in the market, it is equivalent to placing a market order.
This is if there is enough volume in the market.
This is if there is enough volume in the glass.
This all has to be checked in real life. Probably, if there is not enough volume at the best price, it will be added from the next one.
But if we are talking about the work of the Expert Advisor, nothing prevents us from putting the condition that, if there is not enough volume at the best price, we can open the current volume and then open the next best price with the remaining volume. You can do this as many times as you like in the do while loop.
This all has to be checked in real life. It is likely that if there is not enough volume at the best price, the next best price will be added.
But if we are talking about the work of the Expert Advisor, nothing prevents us from stipulating that if we do not have enough volume at the best price, then open the current volume and then reopen the next best price with the rest of the volume. You can do it as many times as you like in the do while loop.
In the case of insufficient volume depends on the type of filling - for RETURN the limit with the remainder will be set in the cup.
By the way, if we place a market order with RETURN, TRADE_ACTION_DEAL and zero price then we can see another transaction TRADE_TRANSACTION_REQUEST with TRADE_ACTION_PENDING and price at the slat.
Regarding the loop over the bar - this will only work for low-liquid ones, otherwise the speed won't be enough. I've written a scalper with speed squeeze, with asynchronous sending, avoiding heavy operations, working with string and no history calls as much as possible. But still, with my ping of 10-12 ms, it can't keep up with the glass.
Strange as it may seem, but it works many times faster with TRADE_ACTION_DEAL, except that the price will always be better,
despite the fact that it is set to the maximum (minimum) in the cup.