Skip to content

Not sure, but seems a bug to me #21

@lousadacbc

Description

@lousadacbc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions