Description Usage Arguments Details Value See Also Examples
chase bid1 or ask1. after every 'chasesleep' seconds, simulator will check wether current order's price equals to bid1 or ask1 price, if not, order chaser will replace it with a new one satisfying the price condition.
1 2 | chasesubmission(instrumentid = "qtid", orderid = NULL, direction = 1,
price = 0, hands = 1, action = "open", chasesleep = 1)
|
instrumentid |
character, instrument identifier. |
orderid |
character, specifying an unique order id, can be generated by randomid(). |
direction |
integer, specifying trading direction. 1 for long, -1 for short. |
price |
numeric, specifiying order pirce.NOTE: when price=0, ordersubmission() will submit a market order; when price=NULL, ordersubmission() will take the corresponding bid1 or ask1 price as submitted price. |
hands |
integer, specifying amount to be submitted. |
action |
character, specifying submit action, action can take value from one of "open","close","closetoday","closepreday" and "cancel". amount submitted in action='close' can not be greater than the sum of current holdings and queuing open hands. |
chasesleep |
numeric, specifying the time interval between each execution check. In seconds. |
chasesubmission is a wrapper of ordersubmission, it act the same as ordersubmission(...,timeoutlist=FALSE,chaselist=TRUE).
order status code.
multisubmission timeoutchasesubmission ordersubmission chasesubmission
1 2 3 4 5 6 7 8 9 | ## Not run:
## submit an open order, buy 1 hand of TF1603 at price 99
## chase bid1 price if it's not executed in the next 10 seconds
## recheck the price condition every 10 seconds.
chasesubmission(instrumentid="TF1603",orderid=randomid(5),
direction=1,price=99,hands=1,action="open".
chasesleep=10)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.