Skip to content

ctx.high[0] giving first date? #211

@sofux

Description

@sofux

I want to compare the high of day with max of last three days high. When today's high exceeds the max of last three days high, I want to create an entry. When I use the following condition, ctx.high[0] refers back to first date of the series vs today.

ctx.bars >= 3 and ctx.indicator('h3bar')[-1] < ctx.high[0]

Is this the expected behavior? If yes, how can I achieve what I am trying to do?

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