Skip to content

Commit e9b40d4

Browse files
committed
Merge branch 'Add-rolling-to-cci_osc' of git://github.com/BillGatesIII/NostalgiaForInfinity into BillGatesIII-Add-rolling-to-cci_osc
2 parents 1e1c6ee + 100a7f3 commit e9b40d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

NostalgiaForInfinityNext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4395,8 +4395,8 @@ def normal_tf_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFram
43954395

43964396
# CCI Oscillator
43974397
cci_36 = ta.CCI(dataframe, timeperiod=36)
4398-
cci_36_max = cci_36.max()
4399-
cci_36_min = cci_36.min()
4398+
cci_36_max = cci_36.rolling(self.startup_candle_count).max()
4399+
cci_36_min = cci_36.rolling(self.startup_candle_count).min()
44004400
dataframe['cci_36_osc'] = (cci_36 / cci_36_max).where(cci_36 > 0, -cci_36 / cci_36_min)
44014401

44024402
# ATR

0 commit comments

Comments
 (0)