SAR cross indicator bug
raftersvk opened this issue · comments
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'])),