replaceall: replaceall

Description Usage Arguments Value See Also Examples

View source: R/hftsimulator.r

Description

replace all satisfied orders with one new one, which has a new price and a hands equal to the cumulated hands of orders replaced.

Usage

1
2
replaceall(instrumentid = NULL, direction = NULL, action = NULL,
  pricemin = NULL, pricemax = NULL, newprice = NULL)

Arguments

instrumentid

character, specifying a filter for instrument identifiers.

direction

integer, specifying a filter for trading directions. 1 for long and -1 for short.

action

character, specifying a filter for actions, can take value from one of "open","close","closetoday","closepreday"

pricemin

numeric, specifying a filter for price lower limit.

pricemax

numeric, specifying a filter for price upper limit.

newprice

numeric, new order price, will replace with a market order when newprice=0.

Value

nothing

See Also

cancelall

Examples

1
2
3
4
5
6
7
## Not run: 
## find all orders satisfy direction==-1 and action=='open' and
## price <=101, replace them with a new order with price 100.01.
replaceall(tradetime,"TF1512",direction=-1,action='open',
           pricemax=101,newprice=100.01)

## End(Not run)

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