HasCrossedBelow Method (2)
HasCrossedBelow (1 of 2)
Summary
Returns true, if dataseries1 has crossed below dataseries2, over the specified Period.
HasCrossedBelow will compare the crossing dataseries to the crossed dataseries starting from the current value of the series going back the specified period. If period is zero only the current bar values will be compared. If period is one the current bar values will be compared as well as the previous. e.g. Functions.HasCrossedBelow(sma.Result, MarketSeries.Close, 0) will only compare the current values which are not completed until the close of the bar. It is not uncommon that the function will return true and by the end of the bar the two series will uncross.
Signature
| public static bool HasCrossedBelow(DataSeries crossingSeries, DataSeries crossedSeries, int period)
|
Parameters
Name | Type | Description |
crossingSeries | DataSeries | Crossing dataseries |
crossedSeries | DataSeries | Crossed dataseries |
period | int | Period for which to check for crossing |
Return Value
bool
Declaring Type
cAlgo.API.Functions
Examples
HasCrossedBelow (2 of 2)
Summary
Checks if dataseries1 has crossed below the value, sometime within the specified period.
HasCrossedBelow compares the crossing dataseries to the value starting from thecurrent value of the series going back the specified period.If period is zero, only the current bar value will be examined.If period is one, the current and previous bar value will be examined.e.g. Functions.HasCrossedAbove(sma.Result, value, 0)will only compare the current simple moving average series valuewhich is not completed until the close of the bar.It is not uncommon that the function will return true and by the end of the bar the series will uncross.
Signature
| public static bool HasCrossedBelow(DataSeries crossingSeries, double value, int period)
|
Parameters
Name | Type | Description |
crossingSeries | DataSeries | Crossing DataDeries |
value | double | Price value to check if crossed |
period | int | Period for which to check for crossing |
Return Value
bool
Declaring Type
cAlgo.API.Functions
Examples
Last update: March 23, 2023