Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

SAR cross indicator bug #284

Open
raftersvk opened this issue Apr 18, 2022 · 0 comments
Open

SAR cross indicator bug #284

raftersvk opened this issue Apr 18, 2022 · 0 comments

Comments

@raftersvk
Copy link
Contributor

It's been a year that I use MGM and I only discover the bug now...
there is a mistake in the way the sar cross is being looked for :
on the buy side instead of

        # Weighted Buy Signal: Price crosses above Parabolic SAR
        'sar_cross': lambda df: (qtpylib.crossed_above(df['sar'],df['close'])),

it should be :

        # Weighted Buy Signal: Price crosses above Parabolic SAR
        'sar_cross': lambda df: (qtpylib.crossed_above(df['close'],df['sar'])),

on the sell side instead of

        # Weighted Sell Signal: Price crosses below Parabolic SAR
        'sar_cross': lambda df: (qtpylib.crossed_below(df['sar'],df['close'])),

it should be :

        # Weighted Sell Signal: Price crosses below Parabolic SAR
        'sar_cross': lambda df: (qtpylib.crossed_below(df['close'],df['sar'])),

here is a sample of how SAR is printed :
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant