ichimoku
¤
ichimoku
¤
ichimoku(
dataframe: DataFrame,
conversion_line_window: int = 9,
base_line_windows: int = 26,
laggin_span: int = 52,
displacement: int = 26,
cloud: bool = False,
prefix: str = "ichimoku_",
inplace: bool = False,
plot: bool | list[str] = False,
plot_kwargs: dict | None = None,
) -> dict[str, Series] | DataFrame
Ichimoku cloud indicator
Note
Do not use chikou_span
for backtesting.
It looks into the future, is not printed by most charting platforms.
It is only useful for visual analysis
Parameters:
-
dataframe
(DataFrame
) –Dataframe containing OHLCV data
-
conversion_line_window
(int
, default:9
) –Conversion line Window. Defaults to 9.
-
base_line_windows
(int
, default:26
) –Base line Windows. Defaults to 26.
-
laggin_span
(int
, default:52
) –Lagging span window. Defaults to 52.
-
displacement
(int
, default:26
) –Displacement (shift). Defaults to 26.
-
cloud
(bool
, default:False
) –Add cloud direction. Defaults to False.
-
prefix
(str
, default:'ichimoku_'
) –description. Defaults to "ichimoku_".
-
inplace
(bool
, default:False
) –description. Defaults to False.
-
plot
(bool | list
, default:False
) –description. Defaults to False.
-
plot_kwargs
(dict | None
, default:None
) –description. Defaults to None.
Returns:
-
dict[str, Series] | DataFrame
–dict[str, pd.Series] | pd.DataFrame: {tenkan_sen, kijun_sen, senkou_span_a, senkou_span_b, leading_senkou_span_a, leading_senkou_span_b, chikou_span, cloud_white, cloud_black}
Source code in lettrade/indicator/trend/ichimoku.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|