Você está na página 1de 11

8/6/2015

Spreadsheet Functions - Sierra Chart

SpreadsheetFunctions
Introduction
ExternalFunctionReference
UsingSpreadsheetFunctions
FunctionParameterDelimiter
SerialDateTimeValues
NewSpreadsheetsFunctionLimitations
AvailableSpreadsheetFunctions

Introduction

[link][Top]

ThisdocumentationpagedocumentsalloftheavailableSpreadsheetfunctions.
Spreadsheetfunctionsareenteredintocells.Theytakeparametersanddata,makecalculationsontheparametersanddata,thenreturntheresulttothesamecelltheyare
enteredin.

ExternalFunctionReference

[link][Top]

FormoredetailedinformationaboutanyoftheSpreadsheetfunctionsdocumentedonthispage,refertotheMicrosoftExcelFunctionReference.

UsingSpreadsheetFunctions

[link][Top]

TouseaSpreadsheetfunction,usethe=signtoindicateaformula,enterthefunctionname,thenentertheparametersanddataenclosedinparentheses().
Separateeachparameterwithacomma",".Theformuladoesnotonlyhavetocontainasinglefunction,itcancontainanythingthatcanbepartofaformulaasdescribedon
theWorkingwithSpreadsheetsdocumentationpage.
SpreadsheetfunctionparameterscanbeNumbers,CellandRangeReferences,OtherFunctions,TextStrings(thetextneedstobeinquotationmarks),DatesandTimes,
LogicalValues(TRUE,FALSE),andErrorValues.
Anyofthesetypescanbeusedasaparameteraslongastheyarecompatiblewithorcanbeconvertedtotheparametertypespecifiedinthefunctionformatinthelistof
SpreadsheetFunctions.Parameterscanalsouseoperators.Useacellorrangereferenceasaparameteroraspartofanexpression,ifyouwanttousedataforafunction
parameterthatislocatedinacellorarange.

Examples:
=SQRT(4)Thisfunctioncanbeenteredinanycellandwillreturn2.
=SQRT(B1)ReturnsthesquarerootofthevalueincellB1.
=SQRT(4+B1)Returnsthesquarerootof4plusthevalueincellB1.TheparametertothisfunctioniscalledanExpression.
=SUM(F4:F24)ReturnsthesumofcellsF4throughF24.
TheformatforsomefunctionsspecifyanExpression.Anexpressionisjustlikeaformula.Exceptthatitisnotprefixedwithan=.Therefore,anythingyoucanuseinaformula
canbeusedinanexpression.SeetheWorkingwithSpreadsheetsdocumentationpageforinformationonformulasandexpressions.Thesimplestformofanexpressionisa
singlenumber(Example:5).AlogicalexpressionisonethatreturnsTRUEifitevaluatestoanonzeronumberandreturnsFALSEifitevaluatesto0.
Ifthefunctionformatshowsaparameterinbrackets([]),thenthatparameterisoptional.
Whenaparameterspecifiesalist,thenuseareferencetoarangeoracommaseparatedlist.
ATextStringistextandcanbeasinglecharacteroraseriesofcharactersenclosedinquotation("")marks.

FunctionParameterDelimiter

[link][Top]

ThedelimitertousebetweenparametersspecifiedinSpreadsheetfunctionscaneitherbeacomma(,)orasemicolon().Exampleusingcomma
delimiter:=SUM(1,2).Exampleusingsemicolondelimiter:=SUM(1,510).
WhichdelimiterisuseddependsupontheRegionsettingin GlobalSettings>>SpreadsheetSettings .Iftheregionyouhavesetusesacomma(,)asadecimalpoint
delimiter,thentheSpreadsheetfunctionparameterdelimiterwillbeasemicolon().Keepthisinmindwhenreviewingthefunctionsbelow.Thefunctionsbelowuseacomma(,)
delimiterbetweenparameters.

SerialDateTimeValues

[link][Top]

SierraChartSpreadsheetsstoreDatesandTimesasdoubleprecisionfloatingpointnumberswhichrepresentthetimesince1900Jan1at00:00.Theinteger

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

1/11

8/6/2015

Spreadsheet Functions - Sierra Chart

partofthefloatingpointnumberrepresentsthedaysandthefractionalpart,totherightofthedecimalplace,representsthetime.ThisisexactlythesamewayasExceland
OpenOfficeCalcrepresentdateandTimevalues.ThisiscalledaSerialDateTimevalue.
TheSpreadsheetStudy,SpreadsheetSystem/AlertandtheSpreadsheetSystemforTradingstudiesoutputDateTimevaluestocolumnAusingthisformat.
TimeExamples:12PMwouldberepresentedas.5.1minuteor00:01wouldberepresentedas1.0/1440.0.Thereare1440minutesinaday.00:01:10wouldberepresented
as70.0/86400.0.Thereare86,400secondsinaday.1secondevaluatesto1.15740740E5.
DateExamples:1900Jan2wouldberepresentedas2.

ComparingSerialDateTimeValues
SinceDateTimevaluesarestoredasfloatingpointnumbers,theyareimprecisewhenyouareperformingcomparisonstothem.TwoDateTimevaluesthatarethesame
whentheyareformattedasaDateandTimestring,maynotgiveyouanexactcomparisonduetofloatingpointerror.Youcanseetheexactvaluesifyouformatthe
spreadsheetcellcontainingtheDateTimevaluetoanumberwith9decimalplaces.
Asolutionwhendoinganequalscomparisonbetween2DateTimevaluesbetweentwodifferentsheetsintheSpreadsheet,istouseaformulasimilartothe
following:=ROUND(A3,8)=ROUND(Sheet2!A3,8).

NewSpreadsheetsFunctionLimitations

[link][Top]

ThenewnonCLR(MicrosoftCommonLanguageRuntime)SpreadsheetsinthenonCLRversionofSierraChartdonotsupportthefollowingfunctions.These
arenotsupportedduetothecomplexityofsupportingcriteriatext.NewerversionsofSierraChartsupportupto60formulacolumns.Itispossibletouseadditionalformula
columnswiththebasicfunctionstoaccomplishthesameresultasthesefunctions.
COUNTIF,AVERAGEIF,MAXIF,MINIF,SUMIF.
Theformula=COUNTIF(AA3:AA12,">50")canbeimplementedinthenonCLRversionasfollows:Inoneofthespreadsheetformulacolumnsenterthis
formula=IF(AA3>50,1,0).AssumingthepriorformulawasenteredinformulacolumnX,thenenter=SUM(X3:X12)inanotherformulacolumn.Theresultofthislastformulawill
bethesameas=COUNTIF(AA3:AA12,">50").

AvailableFunctions

[link][Top]

Format:ABS(Number)

TheabsolutevalueofthegivenNumber.IfthegivenNumberis
an integer, the return value will be an integer. If the given
Number value is a double, the return value will be a double.
Returns#VALUE!ifthegivenNumberisnotanumber.

Format:ACOS(Number)

The arc cosine of the given Number, in radians [0,pi]. Returns


#NUM!ifthegivenNumberisoutsidetherangeof[1,1].Returns
#VALUE!ifthegivenNumberisnotanumber.

Format:ACOSH(Number)

Returns the inverse hyperbolic cosine of the given Number.


Returns #NUM! if the given Number is less than 1. Returns
#VALUE!ifthegivenNumberisnotanumber.
Returnsanaddressrepresentedasatextstring.Returns#NUM!
ifroworcolumnarelessthan1.

Format:ADDRESS(row,column,[ref_type],[ref_style],[sheet_name])

ref_type:
1=AbsoluteRowandColumn.
2=AbsoluteRow,RelativeColumn.
3=RelativeRow,AbsoluteColumn.
4=RelativeRowandColumn.

Format:AND(Boolean,[...])

ReturnsTRUEifandonlyifallofthegivenparametersareequal
to TRUE. Otherwise returns FALSE. Returns #VALUE! if one of
the given parameters could not be interpreted as a boolean
value.Examples:
=AND(E3>10,AA3=100)(SpreadsheetStudyformula)
=AND(C>100,SG1<50)(SimpleAlertformula)
=OR(AND(H>100,SG1>100),AND(L<80,SG1<100))(Simple
Alertformula)

Format:ASIN(Number)

Returns the arc sine of the given Number, in radians [0,pi].


Returns#NUM!ifthegivenNumberisoutsidetherangeof[1,1].
Returns#VALUE!ifthegivenNumberisnotanumber.

Format:ASINH(Number)

ReturnstheinversehyperbolicsineofthegivenNumber.Returns
#VALUE!ifthegivenNumberisnotanumber.

Format:ATAN(Number)

The arc tangent of the given Number, in radians [0,pi]. Returns


#VALUE!ifthegivenNumberisnotanumber.

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

2/11

8/6/2015

Spreadsheet Functions - Sierra Chart

Format:ATANH(Number)

Returns the inverse hyperbolic tangent of the given Number.


Returns #NUM! if the given Number greater or equal than 1 or
lessorequalthat1.Returns#VALUE!ifthegivenNumberisnot
anumber.

Format:AVEDEV(Number,[...])

Returns the average of the absolute deviations of the numbers


fromtheirmean.Returns#VALUE!ifnonumbersarefound.

Format:AVERAGE(Number,[...])

The average of all of the given Numbers. Null values are not
counted as part of the average. Returns #NUM! if all the given
Numbersarenull.Returns#VALUE!ifoneoftheNumbersgiven
couldnotbeinterpretedasanumber.

Format:AVERAGE_IGNOREZEROS(Number,[...])

TheaverageofallofthegivenNumbers,exceptfornumbersthat
are equal to zero. Null values are not counted as part of the
average.Returns#NUM!ifallthegivenNumbersareeithernull
orzero.Returns#VALUE!ifoneoftheNumbersgivencouldnot
beinterpretedasanumber.

Format:CEILING(Number,[Multiple=1])

Rounds the given Number up to the next number that is a


multiple of the given Multiple, if the given Number does not
already satisfy this condition. If Multiple is 1 or not given, the
givenNumberisroundeduptothenextwholeinteger.IfMultiple
is an integer, the returned value will be an integer, otherwise it
will be a double. Returns #NUM! if the given Multiple is zero or
negative.Returns#VALUE!ifeitherthegivenNumberorMultiple
isnotanumber.

Format:CELL(Text,[ReferenceOrRange])

Returns information about a cell. If the first argument is "col" or


"row"thecolumnorrowindexisreturned.Ifthefirstargumentis
"contents" the content of the cell is returned, if it is "type" the
valuetypewillbereturned("b"foranemptycell,"l"foracellwith
constanttextand"v"forothervalues).Ifthesecondargumentis
provided it is either a cell reference to return information about
thereferencedcelloracellrange,toreturninformationaboutthe
firstcellofarange.

Format:CHOOSE(ValueNumber,Value1,[Value2,[...]])

Returns one of the given Value arguments based on the given


ValueNumber. If ValueNumber is 1, the first given Value is
returned. If a cell range references is given as a value, each of
thecellswithinthatrangearetreatedasindividualvaluesforthis
function. For example, CHOOSE(3, A1:A3) will return the value
ofA3.Returns#REF!ifthegivenValueNumberisoutsideofthe
range of the values given. Returns #VALUE! if the given
ValueNumberisnotanumber.

Format:COLUMN([Reference])

Returns the absolute (not relative) number (not index) of the


column of the given Reference. If Reference is not given, then
the number of the column containing this formula is returned.
Returns#VALUE!ifReferenceisgivenandisnotacellreference
valuetype.Theabsolutenumberofthefirstcolumn(A)is1.

Format:COLUMNS(Range)

Returns the number of columns in the given Range. Returns


#VALUE! if the given Range is not a cell range reference value
type.

Format:CONCATENATE(Text,[...])

CombinesthegivenTextvalues,intheorderthattheyaregiven,
and returns the combination as a single text value. Returns
#VALUE!ifoneofthegivenparameterscouldnotbeinterpreted
asatextvalue.

Format:CORREL()

See:PEARSON

Format:COS(Number)

The cosine of the given number. Returns #VALUE! if the given


numberisnotanumber.

Format:COSH(Number)

Returns the hyperbolic cosine of the given Number. Returns


#VALUE!ifthegivenNumberisnotanumber.

Format:COUNT([Values,[...]])

Returns the number of numeric values given in the parameters


list.Ifarangeisgiveninthelist,thiscountsthenumericvaluesin
the range. Numeric values are values that have a value type of
integerordouble.
Returnsthenumberofnonemptyvaluesgivenintheparameters

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

3/11

8/6/2015

Spreadsheet Functions - Sierra Chart

list. If a range is given in the list, this counts the nonempty


valuesintherange.

Format:COUNTA([Values,[...]])

Returns the number of empty/blank values given in the


parameterlist.Ifarangeisgiveninthelist,thiscountstheempty
valuesintherange.

Format:COUNTBLANK([Values,[...]])

Format:CROSSFROMABOVE(range1,range2)
Example:=CROSSFROMABOVE(AA3:AA4,AB3:AB4)
Compares 2 ranges of values. Each range needs to contain at
least 2 numbers and can contain 3 numbers. For the greatest
accuracyusearangewhichincludes3valueswiththisfunction.
Determinesifthefirstrangeofvaluescrossesthesecondrange
fromabove.Returnsabooleanvalue:
TRUE=ThefirstrangecrossesthesecondRangefromabove.
FALSE=ThefirstrangedoesnotcrossthesecondRangefrom
above.

Example:=CROSSFROMABOVE({1,2},{2,1})
Example:=CROSSFROMABOVE(AA3:AA4,{2,1})
Example:=CROSSFROMABOVE(E3:E5,AA3:AA5)
Study
Alert
Condition
Example:CROSSFROMABOVE(SG1,SG2)

Formula

Format:CROSSFROMBELOW(range1,range2)
Example:=CROSSFROMBELOW(AA3:AA4,AB3:AB4)
Compares 2 ranges of values. Each range needs to contain at
least 2 numbers and can contain 3 numbers. For the greatest
accuracyusearangewhichincludes3valueswiththisfunction.
Determinesifthefirstrangeofvaluescrossesthesecondrange
frombelow.Returnsabooleanvalue:
TRUE=ThefirstrangecrossesthesecondRangefrombelow.
FALSE=ThefirstrangedoesnotcrossthesecondRangefrom
below.

Example:=CROSSFROMBELOW({1,2},{2,1})
Example:=CROSSFROMBELOW(AA3:AA4,{2,1})
Example:=CROSSFROMBELOW(E3:E5,AA3:AA5)
Study

Alert

Condition

Formula

Example:CROSSFROMBELOW(SG1,SG2)
Format:CROSSOVER(range1,range2)
Example:=CROSSOVER(AA3:AA4,AB3:AB4)
Example:=CROSSOVER({1,2},{2,1})
Example:=CROSSOVER(AA3:AA4,{1,1})

Compares 2 ranges of values. Each range needs to contain at


least 2 numbers and can contain 3 numbers. For the greatest
accuracyusearangewhichincludes3valueswiththisfunction.
Returnsavaluewhichindicatesthetypeofcrossing:
1=ThefirstRangecrossesthesecondRangefromabove.
1=ThefirstRangecrossesthesecondRangefrombelow.
0=Therangesdonotcrosseachother.

Example:=CROSSOVER(E3:E5,AA3:AA5)
StudyAlertConditionFormulaExample:CROSSOVER(SG1,SG2)

Format:DATE(Year,Month,Day)

ReturnsaSerialDateTimeValueforthegivenYear,Month,and
Day.Returns#NUM!ifthegivenYear,Month,andDaydoesnot
specify a valid day. Returns #VALUE! if any of the parameters
couldnotbeinterpretedasintegervalues.

Format:DATEVALUE(Text)

ReturnsaSerialDateTimeValueforthegivenText,interpreted
as a date string. Returns #NUM! if the given Text cannot be
interpreted as a valid date. Returns #VALUE! if the given Text
cannotbeinterpretedastextvalue.

Format:DAY(SerialDateTimeValue)

Returnsthedayofthemonthforthegivenserialdatetimevalue.
1 is returned for the first day of the month. Returns #VALUE! if
thegivenDateTimecannotbeinterpretedasaserialdatevalue.

Format:DAYS360()

Returnsthenumberofdaysbetweenthestartdateandtheend
dateusinga360dayyear,30daymonthcalendarthatisusedin
accountingsystems.

Format:DEVSQ(Numbers,[...])

Returnsthe sumofthesquaresof deviations fromtheaverage.


Returns#VALUE!ifnonumbersarefound.

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

4/11

8/6/2015

Spreadsheet Functions - Sierra Chart

Format:DEGREES(Radians)

Converts the given Radians into degrees about a unit circle.


Returns#VALUE!ifthegivenRadiansisnotanumber.

Format:EDATE(Date,Months)

ReturnstheserialdatethatisthegivennumberofMonthsafter
thespecifiedDate.IfMonthsislessthan0,thereturnvalueisthe
date that is the indicated number of months before the given
Date.Ifthesamedayofthemonthdoesnotexistintheresulting
month, then the last day of the resulting month is returned.
Returns#VALUE!iftheargumentsarenotintegers.

Format:EOMONTH(Date,Months)

Returnstheserialdatenumberofthelastdayofthemonththat
is a number of months after the specified date. If the second
argument is less than 0, the return value is the date that is the
lastdayofthemonththeindicatednumberofmonthsbeforethe
date.Returns#VALUE!iftheargumentsarenotintegers.

Format:EVEN(Number)

Ifthenumberisnoteven,roundsituptothenextevennumber.If
theNumberislessthan0itwillberoundedawayfrom0.Returns
#VALUE!iftheargumentisnotanumber.

Format:EXP(Number)

Returns the value of e (mathematical constant) raised to the


given Number. Returns #VALUE! if the given Number is not a
number.

Format:FISHER(Number)

Returns the Fisher Transformation for a given number. Returns


#NUM!iftheNumberislessthanorequalto1,orgreaterthan
orequalto1.Returns#VALUE!iftheargumentisnotanumber.

Format:FISHERINV(Number)

Returns the Inverse Fisher Transformation for a given number.


Returns#VALUE!iftheargumentisnotanumber.

Format:FLOOR(Number,[Multiple=1])

Rounds the given Number down to the next number that is a


multiple of the given Multiple, if the given Number does not
already satisfy this condition. If Multiple is 1 or not given, the
given Number is rounded down to the next whole integer. If
Multiple is an integer, the returned value will be an integer,
otherwiseitwillbeadouble.Returns#NUM!ifthegivenMultiple
iszeroornegative.Returns#VALUE!ifeitherthegivenNumber
orMultipleisnotanumber.

Format:FORECAST(X,KnownYs,KnownXs)

Returns a predicted value using linear regression based on the


knownXandknownYvalues.

Format:HLOOKUP(Value,Array,Row,[RangeLookup])

Searches for a value in the topmost row of a table and returns


valuesforanyrowofthesamecolumnwhenthevalueisfound.

Format:HOUR(SerialDateTimeValue)

Returns the hour for the given Serial DateTime Value. This
functionwillreturnvaluesintherange023.Returns#VALUE!if
the given DateTime cannot be interpreted as a serial datetime
value.

Format:IF(Condition,TrueValue,FalseValue)

ReturnsthevalueofTrueValueifthegivenConditionisequalto
TRUE.ReturnsthevalueofFalseValueifthegivenConditionis
equal to FALSE. Returns #VALUE! if the condition could not be
interpretedasabooleanvalue.

Format:INDEX(Range,Index)OrINDEX(Range,Row,Column)

Returns a cell reference within the given Range, either at the


given Index or the given Row and Column within the Range. If
using Index (only one parameter after Range) on a Range with
multiplerowsandcolumns,theitemsareordereddownbyrows
first,andthenacrossbycolumns.Index,Range,andColumnare
all1based,meaningusingavalueof1willreturnthefirstvalue.
Returns #REF! if the given Index, Row, or Column is outside of
the given Range. Returns #VALUE! if the given Range is not a
cellreferencerangetype,orifthegivenIndex,Row,orColumn
couldnotbeinterpretedasintegervalues.

Format:INDIRECT(ReferenceText)

Returns a cell reference specified by the given ReferenceText.


TheReferenceTextmustbeatextvaluethatcanbeparsedasa
standard reference as used in formulas. This function only
supportsbasiccellreferences.Returnsa#REF!errorifthegiven
ReferenceTextcannotbeparsedorisotherwiseinvalid.Returns
#VALUE!ifthegivenReferenceTextisnotatextvalue.
Rounds the given Number down to the next whole integer.

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

5/11

8/6/2015

Spreadsheet Functions - Sierra Chart

Format:INT(Number)

Returns#VALUE!ifthegivenNumberisnotanumber.Returns0
if Number is an empty value, like a reference to a cell that
containsnodata.

Format:ISBLANK()

RefertoISNULL.

Format:ISEMTPY()

RefertoISNULL.

Format:ISERR(Value)

ReturnsTRUEifthegivenValueisanerrorvaluetype,exceptin
thecaseof#N/A.Otherwise,ifthegivenValueis#N/A,orsome
othervaluetype,returnsFALSE.

Format:ISERROR(Value)

Returns TRUE if the given Value is an error value type.


OtherwisereturnsFALSE.

Format:ISEVEN(Number)

Returns TRUE if the given Number is an even number.


OtherwisereturnsFALSE.IfthegivenNumberisadoublevalue,
only the integer part is checked. Returns #VALUE! if the given
Numberisnotanumber.

Format:ISLOGICAL(Value)

Returns TRUE if the given Value is a boolean value type.


OtherwisereturnsFALSE.

Format:ISNULL(Number)

Returns TRUE if the given Value is null (no value type).


OtherwisereturnsFALSE.

Format:ISNUMBER(Number)

Returns TRUE if the given Value is an integer or double value


type.OtherwisereturnsFALSE.

Format:ISODD(Number)

ReturnsTRUEifthegivenNumberisanoddnumber.Otherwise
returns FALSE. If the given Number is a double value, only the
integerpartischecked.Returns#VALUE!ifthegivenNumberis
notanumber.

Format:ISRANGE(Value)

Returns TRUE if the type of the given Value is a range type.


OtherwisereturnsFALSE.

Format:ISREF(Value)

ReturnsTRUEifthetypeofthegivenValueisareferencetype.
OtherwisereturnsFALSE.

Format:ISTEXT(Value)

ReturnsTRUEifthegivenValueisatextvaluetype.Otherwise
returnsFALSE.

Format:LARGE(Numbers,NthLargest)

Returns the Nth largest number from an array of numbers. The


first argument is the array, while the last arguments controls
which number will be returned. 1 means the largest number, 2
the second largest and so on. Empty cells are not counted,
TRUEwillbeconsideredas1,FALSEas0.Returns#VALUE!if
thelastargumentislargerthan1orgreaterthanthenumberof
numericalvalues(andbooleans)inthearray.

Format:Left(Text,Count)

Returns the given Count number of characters from left side of


the given Text string. If Count is greater than the length of the
givenTextstring,thentheentirestringwillbereturned.IfCount
is 0, an empty string is returned. If the given Count is negative,
thentheentirelengthofthegivenTextstring,exceptforCount
characters, will be returned. Returns #VALUE! if Text is not a
string,orCountisnotaninteger.

Format:LN(Number)

Returns the natural logarithm (using base e) of the given


Number. Returns #NUM! if the given Number is less than or
equalto0.Returns#VALUE!ifthegivenNumerisnotanumber.

Format:LOG(Number,[Base=10])

ReturnsthelogarithmofthegivenNumberusingthegivenBase.
If Base is not given, the base defaults to 10. Returns #NUM! if
either the given Number or Base is less than or equal to 0.
Returns #VALUE! if either the given Number or Base is not a
number.

Format:LOG10(Number)

Returns the logarithm of the given Number using base 10.


Returns #NUM! if the given Number is less than or equal to 0.
Returns#VALUE!ifthegivenNumberisnotanumber.

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

6/11

8/6/2015

Spreadsheet Functions - Sierra Chart

Searches an array/range for Number using MatchTypeas the


comparison method, and returns the onebased index into this
array/range of numbers indicating the position of the match.
Returns#N/A!ifnomatchisfound.
MatchType:Thisisoptionalandthedefaultvalueis0.Itcanbe
oneofthefollowing:

Format:MATCH(Number,Range,[MatchType])

1= Returnstheindextothesmallestnumberinthe
array/range that is greater than or equal toNumber.
Array/rangemustbeindescendingorder.
0 = Returns the index to the number in the
array/rangethatisqualtoNumber.
1 = Returns the index to the largest number in the
array/range that is less than or equal toNumber.
Array/rangemustbeinascendingorder.

Format:MAX(Numbers,[...])

Returnsthenumberwiththemaximumvalueoutofallthegiven
Numbers. Returns #VALUE! if one of the given Numbers could
notbeinterpretedasanumber.

Format:MAXL(Value,Numbers,[...])

Returnsthenumberwiththemaximumvalueoutofallthegiven
Numbers that is less than the given Value. Returns #VALUE! if
the given Value or one of the given Numbers could not be
interpretedasanumber.

Format:MEDIAN(Numbers,[...])

ThemedianvalueofallofthegivenNumbers.Nullvaluesarenot
counted as part of the median. No value is returned if all the
givenNumbersarenull.Returns#VALUE!ifoneoftheNumbers
givencouldnotbeinterpretedasanumber.

Format:MID(Text,Offset,Count)

Returns the text string from the middle of the given Text string,
starting at the given Offset, and including the given Count
number of characters. If Offset is 0, the result will start at the
beginning of the string. If Offset + Count is greater than the
lengthofthegivenTextstring,thereturnedtextwillgouptothe
end of the given Text string. If Count is 0, or Offset is greater
than or equal to the length of the sting, an empty string will be
returned.Returns#NUM!ifthegivenOffsetorCountisnegative.
Returns#VALUE!ifTextisnotatextvalue,orifOffsetorCount
couldnotbeinterpretedasintegervalues.

Format:MIN(Numbers,[...])

Returnsthenumberwiththeminimumvalueoutofallthegiven
Numbers. Returns #VALUE! if one of the given Numbers could
notbeinterpretedasanumber.

Format:MING(Value,Numbers,[...])

Returnsthenumberwiththeminimumvalueoutofallthegiven
NumbersthatisgreaterthanthegivenValue.Returns#VALUE!
if the given Value or one of the given Numbers could not be
interpretedasanumber.

Format:MINUTE(SerialDateTimeValue)

Returns the minute for the given Serial DateTime Value. This
functionwillreturnvaluesintherange059.Returns#VALUE!if
the given DateTime cannot be interpreted as a serial datetime
value.

Format:MINZ(Numbers,[...])

Returnsthenumberwiththeminimumvalueoutofallthegiven
Numbersthatisgreaterthanzero.Returns#VALUE!ifoneofthe
givenNumberscouldnotbeinterpretedasanumber.

Format:MOD(Number,Divisor)

TheremainderofthegivenNumberdividedbythegivenDivisor.
Returns #DIV/0! if the given Divisor is 0. Calculates the return
valueusingtheformulaNumberDivisor*INT(Number/Divisor)
thatgivestheresultwhentheargumentsarenotintegers.

Format:MONTH(DateTime)

Returns the month for the given Serial DateTime Value. 1 is


returned for the first month of the year (January). Returns
#VALUE!ifthegivenDateTimecannotbeinterpretedasaserial
datevalue.
Rounds the given Number to the nearest number that is a
multiple of the given Multiple, if the given Number does not
alreadysatisfythiscondition.IfMultipleis1,thegivenNumberis

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

7/11

8/6/2015

Spreadsheet Functions - Sierra Chart

Format:MROUND(Number,Multiple)

roundedtothenearestwholeinteger.IfMultipleisaninteger,the
returned value will be an integer, otherwise it will be a double.
Returns#NUM!ifthegivenMultipleiszeroornegative.Returns
#VALUE!ifeitherthegivenNumberorMultipleisnotanumber.

Format:MROUNDDOWN()

RefertoFLOOR.

Format:MROUNDUP()

RefertoCEILING.

Format:NETWORKDAYS(StartDate,EndDate,[Holidays])

Returns work days between the given StartDate and EndDate,


including both the StartDate and the EndDate, not counting
weekendsorthespecifiedHolidays.

Format:NOW()

Returns the current local date and time as a Serial DateTime


Value. The serial datetime value 2.0 represents 00:00:00
(midnight), January 1st, 1900, and 2.5 represents 12:00:00
(noon)forthatsameday.

Format:ODD(Number)

Ifthenumberisnotodd,roundsituptothenextoddnumber.If
theNumberislessthan0itwillberoundedawayfrom0.Returns
#VALUE!iftheargumentisnotanumber.

Format:OFFSET(From,Rows,Columns,[Height],[Width])

Returns the reference or the cell range calculated from a


reference or a cell range (passed as the first argument) and
someoffsetvalues.

Format:OR(Boolean,[...])

Returns FALSE if and only if all of the given parameters are


equal to FALSE. Otherwise returns TRUE. Returns #VALUE! if
one of the given parameters could not be interpreted as a
booleanvalue.Examples:
=OR(E3<10,E3>15)(SpreadsheetStudyformula)
=OR(SG1>40,SG1<20)(SimpleAlertformula)
=OR(AND(H>100,SG1>100),AND(L<80,SG1<100))(Simple
Alertformula)

Format:PEARSON(Array1,Array2)

Returns the Pearson product moment correlation coefficient


between1.0and1.0.Returns#VALUE!ifthesizeofthearrays
arenotequalorthearraysareempty.Returns#DIV/0!forcertain
arrays.

Format:PERCENTILE(Numbers,K)

ReturnstheKthpercentileofvaluesinacellrange.Useslinear
interpolation between values if K is not a multiple of 1 / (n 1),
where n is the number of the numerical values found in the cell
range.Returns#VALUE!ifKisnotanumber.Returns#NUM!if
Kislessthan0orgreaterthan1.

Format:PERCENTRANK(Array,X,[Significance])

Returnstherankofavalueinadatasetasapercentageofthe
datasetsize.Ifthevaluecanbefoundinbetweentwovaluesof
theset,thereturnvaluewillbecalculatedbylinearinterpolation.
Returns #VALUE! if the number is less than the smallest or
greater than the biggest number. Returns #NUM! if the array is
empty.Ifthethirdargumentisprovideditwillcontrolhowmany
digitswillbeusedtocomparevalues.Ifthethirdargumentisless
than1the#NUM!errorwillbereturned.

Format:PROB(Values,Probability,LowerLimit,[UpperLimit])

Calculatestheprobabilitythatvaluesinarangearebetweentwo
limits. If the upper limit is omitted calculates the probability that
values in the range are equal to the lower lmit. If the Numbers
andtheProbabilitiescontaindifferentnumberofdatapointsthe
function will return #N/A error. If any probability value is less or
equalto0orgreaterthan1.0thefunctionwillreturn#NUM!error.
If the total of the probability is not 1.0 the functions returns
#NUM!error.

Format:RADIANS(Degrees)

Converts the given Degrees into radians about a unit circle.


Returns#VALUE!ifthegivenDegreesisnotanumber.

Format:RAND()OrRAND(Low,High)

Generatesarandomdecimalnumber.Ifnoargumentsaregiven,
returns a random decimal number from 0.0 to 1.0. Returns
#ARGS!ifonlyoneargumentisgiven.IfthetwoargumentsLow
andHigharegiven,returnsarandomdecimalnumberfromLow
to High. Returns #NUM! if Low is greater than High. Returns
#VALUE if the given Low or High could not be interpreted as
numbers.

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

8/11

8/6/2015

Format:RANDINT()OrRANDINT(Low,High)

Spreadsheet Functions - Sierra Chart

Generates a random integer number. If the single argument


Count is given, returns a randomly selected integer from 1 to
Count. Returns #NUM! if Count is less than 1. If the two
argumentsLowandHigharegiven,returnsarandomlyselected
integerfromLowtoHigh.Returns#NUM!ifLowisgreaterthan
High. Returns #VALUE! if Count, Low, or High could not be
interpretedasintegervalues.

Format:RIGHT(Text,Count)

ReturnsthegivenCountnumberofcharactersfromrightsideof
the given Text string. If Count is greater than the length of the
givenTextstring,thentheentirestringwillbereturned.IfCount
is 0, an empty string is returned. If the given Count is negative,
thentheentirelengthofthegivenTextstring,exceptforCount
characters, will be returned. Returns #VALUE! if Text is not a
string,orCountisnotaninteger.

Format:ROUND(Number,[Digits=0])

Rounds the given Number to the nearest number with the


number of given Digits. If Digits is 0 or not given, the given
Number is rounded to the nearest whole integer. If Digits is
positive,thegivenNumberisroundedtothenearestnumberwith
that many decimal digits. Example: ROUND(1.235,1) = 1.2
ROUND(1.235,2)=1.24.IfDigitsisnegative,thegivenNumber
isroundedtothenearestnumberthatisamultipleof10^(Digits).
Example:ROUND(1235,1)=1240ROUND(1235,2)=1200.If
Digits>=0,thereturnedvaluewillbeaninteger,otherwiseitwill
be a double. Returns #VALUE! if the given Number is not a
number,orifthegivenDigits(whengiven)isnotaninteger.

Format:ROUNDDOWN(Number,[Digits=0])

Rounds the given Number down to the next number with the
number of given Digits, if the given Number does not already
satisfy this condition. Rounding down means closer to 0, so a
positive number rounded down will be less than or equal to the
given Number, and a negative number rounded down will be
greater than or equal to the given Number. If Digits is 0 or not
given, the given Number is rounded down to the next whole
integer.IfDigitsispositive,thegivenNumberisroundeddownto
the next number with that many decimal digits. Example:
ROUNDDOWN(1.235,1)=1.2ROUNDDOWN(1.235,2)=1.23.If
Digitsisnegative,thegivenNumberisroundeddowntothenext
number that is a multiple of 10^(Digits). Example:
ROUNDDOWN(1235, 1) = 1230 ROUNDDOWN(1235, 2) =
1200. If Digits >= 0, the returned value will be an integer,
otherwise it will be a double. Returns #VALUE! if the given
Numberisnotanumber,orifthegivenDigits(whengiven)isnot
aninteger.

Format:ROUNDUP(Number,[Digits=0])

Rounds the given Number up to the next number with the


number of given Digits, if the given Number does not already
satisfythiscondition.Roundingupmeansfartherawayfrom0,so
apositivenumberroundedupwillbegreaterthanorequaltothe
given Number, and a negative number rounded up will be less
thanorequaltothegivenNumber.IfDigitsis0ornotgiven,the
givenNumberisroundeduptothenextwholeinteger.IfDigitsis
positive,thegivenNumberisroundeduptothenextnumberwith
that many decimal digits. Example: ROUNDUP(1.235,1) = 1.3
ROUNDUP(1.235,2) = 1.24. If Digits is negative, the given
Number is rounded up to the next number that is a multiple of
10^(Digits). Example: ROUNDUP(1235, 1) = 1240
ROUNDUP(1235, 2) = 1300. If Digits >= 0, the returned value
willbeaninteger,otherwiseitwillbeadouble.Returns#VALUE!
ifthegivenNumberisnotanumber,orifthegivenDigits(when
given)isnotaninteger.

Format:ROW([Reference])

Returnstheabsolute(notrelative)number(notindex)oftherow
of the given Reference. If Reference is not given, then the
number of the row containing this formula is returned. Returns
#VALUE! if Reference is given and is not a cell reference value
type.Theabsolutenumberofthefirstrow(1)is1.

Format:SECOND(SerialDateTimeValue)

Returns the second for the given Serial DateTime Value. This
functionwillreturnvaluesintherange059.Returns#VALUE!if
the given DateTime cannot be interpreted as a serial datetime
value.

Format:SIGN(Number)

Returns1ifthegivenNumberispositive,1ifthegivenNumber
isnegative,or0ifthegivenNumberiszero.Returns#VALUE!if
thegivenNumberisnotanumber.
The sine of the given number. Returns #VALUE! if the given

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727p

9/11

8/6/2015

Spreadsheet Functions - Sierra Chart

Format:SIN(Number)

numberisnotanumber.

Format:SINH(Number)

Returns the hyperbolic sine of the given Number. Returns


#VALUE!ifthegivenNumberisnotanumber.

Format:SLOPE(KnownYs,KnownXs)

Calculatestheslopeofthelinearregressionlinethroughasetof
xandyvalues.

Format:SMALL(Numbers,NthSmallest)

ReturnstheNthsmallestnumberfromanarrayofnumbers.The
first argument is the array, while the last arguments controls
whichnumberwillbereturned.1meansthesmallestnumber,2
the second smallest and so on. Empty cells are not counted,
TRUEwillbeconsideredas1,FALSEas0.Returns#VALUE!if
thelastargumentissmallerthan1orgreaterthanthenumberof
numericalvalues(andbooleans)inthearray.

Format:SQRT(Numbers)

ThesquarerootofthegivenNumber.Returns#NUM!ifthegiven
Numberisnegative.Returns#VALUE!ifthegivenNumberisnot
anumber.

Format:STDEV(Numbers,[...])

Returnsthestandarddeviationofasample.Returns#VALUE!if
lessthan2numbersarefound.

Format:SUM(Numbers,[...])

Thetotalofallthenumbersgivenaddedtogether.Ifallthegiven
Numbers are integer values, then the result will be an integer
value. Otherwise the result will be a double value. Returns
#VALUE!ifoneofthegivenNumberscouldnotbeinterpretedas
anumber.

Format:TAN(Numbers)

Thetangentofthegivennumber.Returns#VALUE!ifthegiven
numberisnotanumber.

Format:TANH(Numbers)

Thehyperbolictangentofthegivennumber.Returns#VALUE!if
thegivennumberisnotanumber.

Format:TIME(Hour,Minute,Second)

Returns a Serial DateTime Value for the given Hour, Minute,


and Second. Returns #NUM! if the given Hour, Minute, and
Seconddoesnotspecifyavalidtime.Returns#VALUEifanyof
theparameterscannotbeinterpretedasintegervalues.
ReturnsthegivenValueasatextvalue.ThegivenFormattextis
used for formatting numeric values. It is optional and has no
effectonothervaluetypes.
To format a number with a specific number of decimal places,
useaformatsuchas".000"or".###".Foreach"0"followingthe
decimal point in the Format, that many decimal points will be
displayed,eveniftheyareinsignificant.Forexample:TEXT(0.05,
"0.000") will return "0.050". For each number sign (#) following
thedecimalpointintheFormat,thatmanydecimalpointswillbe
displayed, except for trailing zeros. For example: TEXT(0.05,
"0.###")willreturn"0.05".

Format:TEXT(Value,Format)

These two methods can be combined such that ".00##" will


format numbers with a minimum of two decimal digits and a
maximum of four decimal digits. Values will be rounded to the
maximumnumberofdecimaldigitsthatcanbeshown.
Zeros placed before the decimal point indicate to use leading
zeros for the whole number. For example: TEXT(2.5, "000.##")
willreturn"002.5".
Number signs (#) before the decimal point have no effect. The
decimal point in the Format text must match the global setting
that specifies the decimal point character. The decimal point
characterusedinthereturnedvaluewillmatchtheglobalsetting.

Format:TIMEVALUE(Text)

ReturnsaSerialDateTimeValueforthegivenText,interpreted
as a time string. Returns #NUM! if the given Text cannot be
interpreted as a valid time. Returns #VALUE if the given Text
cannotbeinterpretedastextvalue.

Format:TODAY()

Returns the current local date as a Serial DateTime Value. A


serial date value is the number of days since 18991230. The
serialdatevalueforJanuary1st,1900is2.

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727

10/11

8/6/2015

Spreadsheet Functions - Sierra Chart

Format:TRUNC(Number,[Digits=0])

Returns the given Number truncated to the given number of


Digits.IfthegivennumberofDigitsis0ornotspecified,thenthe
Number is truncated to a whole number. If the given number of
Digits is greater than 0, then the given Number is truncated to
that many decimal digits. If the given number of Digits is less
than 0, then the given Number is truncated to the multiple of
10^(Digits). Returns #VALUE! if the given Number is not a
number,orthegivenDigitsisnotaninteger.

Format:TRUNCHOUR(DateTime,[Hours=1])

ReturnsthegivenDateTimetruncateddowntotheexacthour.If
Hoursisgreaterthan1,thegivenDateTimeistruncateddownto
the interval of the given Hours (e.g. 2 hours, 3 hours, etc.).
Returns #NUM! if the given Hours is less than 1. Returns
#VALUE! if the given DateTime is not a number, or the given
Hoursisnotaninteger.

Format:TRUNCMIN(DateTime,[Minutes=1])

ReturnsthegivenDateTimetruncateddowntotheexactminute.
If Minutes is greater than 1, the given DateTime is truncated
down to the interval of the given Minutes (e.g. 5 minutes, 10
minutes,etc.).Returns#NUM!ifthegivenMinutesislessthan1.
Returns#VALUE!ifthegivenDateTimeisnotanumber,orthe
givenMinutesisnotaninteger.

Format:TRUNCSEC(DateTime,[Seconds=1])

ReturnsthegivenDateTimetruncateddowntotheexactsecond.
If Seconds is greater than 1, the given DateTime is truncated
down to the interval of the given Seconds (e.g. 5 seconds, 10
seconds,etc.).Returns#NUM!ifthegivenSecondsislessthan
1. Returns #VALUE! if the given DateTime is not a number, or
thegivenSecondsisnotaninteger.

Format:TYPE(Argument)

Returns the type of an argument encoded as an integer. Empty


cells considered to have a numerical value returning 1. Return
values:
1=Number
2=Textstring
4=Logicalvalue
16=Errorvalue
64=Cellrange

Format:VALUE(Text)

Converts the given Text into a number. Returns #VALUE! if the


text cannot be properly converted into a number. If a numeric
valuetypeisgivenfortheText,thatvalueissimplyreturned.

Format:VLOOKUP(Value,Array,Column,[RangeLookup])

Searches for a value in the leftmost column of a table and


returnsvaluesforanycolumnofthesamerowwhenthevalueis
found.

Format:WEEKDAY(SerialDateTimeValue)

Returns an integer representing the day of the week for the


given Serial DateTime Value. The return value will be in the
range of 17 (1=Sunday, 7=Saturday). Returns #VALUE! if the
givenDateTimecannotbeinterpretedasaserialdatevalue.

Format:WEEKNUM(SerialDateTimeValue)

Returns an integer representing the week number that contains


thegivenSerialDateTimeValue.Thereturnvaluewillbeinthe
rangeof153.AdateofJanuary1stofanygivenyearwillalways
return a value of 1. Subsequent weeks start at midnight on
Sunday. Returns #VALUE! if the given DateTime cannot be
interpretedasaserialdatevalue.

Format:WORKDAY(StartDate,WorkDays,[Holidays])

Returns the serial date that is the given number of WorkDays


beforeorafterthegivenStartDate.Workdaysexcludeweekends
andanygivenHolidays.

Format:YEAR(DateTime)

Returns the year for the given Serial DateTime Valuevalue.


Returns#VALUE!ifthegivenDateTimecannotbeinterpretedas
aserialdatevalue.

Format:ZTEST(Array,Mu,[Sigma])

Calculates the onetailed ztest. If the third argument is omitted


thestandarddeviationisgoingtobeusedassigma.Ifthearray
isemptythe#N/A!errorwillbereturned.

*LastmodifiedWednesday,05thAugust,2015.

data:text/html;charset=utf-8,%3Ch1%20class%3D%22PageName%22%20style%3D%22font-size%3A%2031.4599990844727

11/11

Você também pode gostar