@@ -98,42 +98,42 @@ exports.getFilterFn = function(direction) {
98
98
switch ( direction ) {
99
99
case 'increasing' :
100
100
return function ( o , c , isPrevThisDirection , oprev , cprev ) {
101
- if ( o == c ) {
102
- if ( c > cprev ) {
103
- return true // increasing
104
- } else if ( c < cprev ) {
105
- return false // decreasing
101
+ if ( o === c ) {
102
+ if ( c > cprev ) {
103
+ return true ; // increasing
104
+ } else if ( c < cprev ) {
105
+ return false ; // decreasing
106
106
} else {
107
- if ( isPrevThisDirection === true ) {
108
- return true // determine by last candle
109
- } else if ( isPrevThisDirection == false ) {
110
- return false // determine by last candle
107
+ if ( isPrevThisDirection === true ) {
108
+ return true ; // determine by last candle
109
+ } else if ( isPrevThisDirection = == false ) {
110
+ return false ; // determine by last candle
111
111
} else {
112
- return true // If we don't have previous data, assume it was increasing
112
+ return true ; // If we don't have previous data, assume it was increasing
113
113
}
114
114
}
115
115
}
116
- return o < c ;
116
+ return o < c ;
117
117
} ;
118
118
119
119
case 'decreasing' :
120
- return function ( o , c , isPrevThisDirection , oprev , cprev ) {
121
- if ( o == c ) {
122
- if ( c > cprev ) {
123
- return false // increasing
124
- } else if ( c < cprev ) {
125
- return true // decreasing
120
+ return function ( o , c , isPrevThisDirection , oprev , cprev ) {
121
+ if ( o === c ) {
122
+ if ( c > cprev ) {
123
+ return false ; // increasing
124
+ } else if ( c < cprev ) {
125
+ return true ; // decreasing
126
126
} else {
127
- if ( isPrevThisDirection === true ) {
128
- return true // determine by last candle
129
- } else if ( isPrevThisDirection == false ) {
130
- return false // determine by last candle
127
+ if ( isPrevThisDirection === true ) {
128
+ return true ; // determine by last candle
129
+ } else if ( isPrevThisDirection = == false ) {
130
+ return false ; // determine by last candle
131
131
} else {
132
- return false // If we don't have previous data, assume it was increasing
132
+ return false ; // If we don't have previous data, assume it was increasing
133
133
}
134
134
}
135
135
}
136
- return o > c ;
136
+ return o > c ;
137
137
} ;
138
138
}
139
139
} ;
0 commit comments