MarketScript > Functions > Creating Strips |
There are two ways to create strip function.
Use n (n >= 2) expressions and optional boolean parameter called manual.
strip (expr1, expr2, …, exprN [, manual])
Specify symbols or streams of data to be used as strip input.
Specifies whether manual strip should be used (i.e. should expression’s last values be used in strip calculation after expression’s underlying symbol’s expiration date). Default value is false.
strip("/CLA12", "/CLB12")
strip("/CLA12"/2, "/CLB12", "/CLC12", manual:true)
strip("/CLA12"/2, "/CLB12", "/CLC12", manual:false)
Use symbol range and boolean parameter called manual.
strip(symbolRange [, manual])
Specifies range of symbols to be used as strip input. This range is calculated using expiration dates of underlying root. For example, symbol range consisting of all symbols expiring in year 2011 of root /CL is written as follows: “/CL”[1/2011:12/2011]. The symbol range can be comprised of continuous symbols which is written as strip("/CL"<0:11>). Symbol range can also be specified using two digit year notation and month codes for months. So, the range "/CL"[1/2011:12/2011] can also be written as follows: "/CL"[1/11:12/11], "/CL"[A11:T11], "/CL"[F11:Z11]...
Specifies whether manual strip should be used (i.e. should expression’s last values be used in strip calculation after expression’s underlying symbol’s expiration date). Default value is false.
strip("/CL"[1/2011:12/2011])
strip("/CL"[1/11:12/11], manual:true)
strip("/CL"[F11:Z11], manual:false)
strip("/CL"<0:11>)