Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not sure, but seems a bug to me #21

Open
lousadacbc opened this issue Nov 13, 2023 · 1 comment
Open

Not sure, but seems a bug to me #21

lousadacbc opened this issue Nov 13, 2023 · 1 comment

Comments

@lousadacbc
Copy link

return new CandleIndicatorResult(Success, outBegIdx, outNBElement, outInteger);

I'm trying identify patterns right after market opens, in 5 minutes candles. For instance, when I run GetLookback() for Candle3WhiteSoldiers, I got 12, so What I understand is that I have to have 12 5 minute candles to be able to identify this pattern. In other words, I can only identify it after 60 minutes, and I wanted to identify it in the first 20 to 30 minutes. Is it possible to change it to a shorter interval?

The bug I think exists is:

If we don't have enough candles to identify the pattern, it shouldn't return a success message here, but an error message, am I right?

    // Identify the minimum number of price bar needed to calculate at least one output.
    int lookbackTotal = GetLookback();

    // Move up the start index if there is not enough initial data.
    if (startIdx < lookbackTotal)
    {
        startIdx = lookbackTotal;
    }

    // Make sure there is still something to evaluate.
    if (startIdx > endIdx)
    {
        return new CandleIndicatorResult(**Success**, outBegIdx, outNBElement, outInteger);
    }

If I'm wrong, I apologize, I'm a little rusty with programming.
Thanks, and nice job

@phmatray
Copy link
Owner

Hello @lousadacbc
Here is the original C file wrote by Angelo Ciceri
https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_CDL3WHITESOLDIERS.c

I will investigate.

Thanks

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

No branches or pull requests

2 participants