Description Usage Arguments Value Examples
execute and order immediatele with a specified price, without going through the simulation system. Can be used to comparing simulated strategy with a perfect situation.
1 2 | perfectexecution(instrumentid, orderid = "xxx", direction, price, hands,
action)
|
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. |
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. |
nothing.
1 2 3 4 5 6 7 | ## Not run:
## submit an open order, buy 1 hand of TF1603 at price 99
## the order will be executed immediately at price 99
perfectexecution(instrumentid="TF1603",orderid='xxx',
direction=1,price=99,hands=1,action="open")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.