Skip to content

Commit 3373a1c

Browse files
committed
Fix readme divergence examples
1 parent 78e8559 commit 3373a1c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -630,12 +630,12 @@ pd_df = download(
630630
storage_path="./data"
631631
)
632632

633-
# Calculate bullish divergence for Polars DataFrame
634-
pl_df = bullish_divergence(pl_df, first_column="Close", second_column="RSI_14", window_size=8)
633+
# Calculate bearish divergence for Polars DataFrame, treat first_column always as the indicator column
634+
pl_df = bearish_divergence(pl_df, first_column="RSI_14", second_column="Close", window_size=8)
635635
pl_df.show(10)
636636

637-
# Calculate bullish divergence for Pandas DataFrame
638-
pd_df = bullish_divergence(pd_df, first_column="Close", second_column="RSI_14", window_size=8)
637+
# Calculate bearish divergence for Pandas DataFrame
638+
pd_df = bearish_divergence(pd_df, first_column="RSI_14", second_column="Close", window_size=8)
639639
pd_df.tail(10)
640640
```
641641

@@ -684,12 +684,12 @@ pd_df = download(
684684
storage_path="./data"
685685
)
686686

687-
# Calculate bearish divergence for Polars DataFrame
688-
pl_df = bearish_divergence(pl_df, first_column="Close", second_column="RSI_14", window_size=8)
687+
# Calculate bearish divergence for Polars DataFrame, treat first_column always as the indicator column
688+
pl_df = bearish_divergence(pl_df, first_column="RSI_14", second_column="Close", window_size=8)
689689
pl_df.show(10)
690690

691-
# Calculate bearish divergence for Pandas DataFrame
692-
pd_df = bearish_divergence(pd_df, first_column="Close", second_column="RSI_14", window_size=8)
691+
# Calculate bearish divergence for Pandas DataFrame, treat first_column always as the indicator column
692+
pd_df = bearish_divergence(pd_df, first_column="RSI_14", second_column="Close", window_size=8)
693693
pd_df.tail(10)
694694
```
695695

0 commit comments

Comments
 (0)