Open Tzion opened 5 months ago
So you think the candle is defined in such a way that C code should trigger and it isn't? Or are you wondering if there is a definition issue where the example prices don't trigger and should?
I think that the C code doesn't trigger the pattern when it should - according to the pattern describe in the documentation
It is solved when I'm adding another candle from the left:
candles = {
'open': pd.Series([8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 7.9, 8.2, 9.4, 9.0]),
'high': pd.Series([8.8, 8.8, 8.8, 8.8, 8.8, 8.8, 8.8, 8.8, 9.0, 9.0, 10.5, 9.0]),
'low': pd.Series([7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.8, 7.9, 9.2, 8.0]),
'close': pd.Series([8.5, 8.7, 8.7, 8.7, 8.7, 8.7, 8.7, 8.7, 8.1, 9.0, 9.2, 8.0])
}
So the issue is about the definitions:
Instead of
average of the 10 previous candles'
in practice it's checking the average of the 11 previous candles'
How can I change the global candles settings (TA_CandleSetting
) when using the python wrapper?
What do you need to change?
We currently expose that through a talib._ta_lib._ta_set_candle_settings
function.
Thanks @mrjbq7
it is minor bug of off-by-one - the calculation should be over 10 candles and not 11.
The pattern 'shooting star' is not detected on sample data (
talib.CDLSHOOTINGSTAR
)Here is a test file to reproduce it - you can run it directly and see the plot printed to the screen. The shooting star candle is the second from the end.
You can run this simple python file and see that there's no detection and the pattern on the chart:
This is the chart:
I followed and made sure that the definition of my candles are correct according to the documentation in the C source code of the Shooting star pattern:
And I also made sure that the candles follows the default global definitions: