perfectexecution: perfectexecution

Description Usage Arguments Value Examples

View source: R/hftsimulator.r

Description

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.

Usage

1
2
perfectexecution(instrumentid, orderid = "xxx", direction, price, hands,
  action)

Arguments

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.

Value

nothing.

Examples

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)

chenhaotian/High-Frequency-Trading-Simulation-System documentation built on April 18, 2018, 9:24 p.m.