I will place this here just incase anyone else finds it helpful

```
public bool zIsFalling(ISeries<double> series ,int startBar,int barsBack)
```

{

for(int i = startBar; i < barsBack; i++)

{

if(series[i] > series[i+1]) return false;

}

return true;

}

public bool zIsRising(ISeries<double> series ,int startBar,int barsBack)

{

for(int i = startBar; i < barsBack; i++)

{

if(series[i] < series[i+1]) return false;

}

return true;

}

## Leave a comment: