Skip to content

How can you use df column instead of indicator class to trigger buy and sell? #64

Closed
@leeu3581

Description

@leeu3581

If I have a df column of True and False values, is there a way for this to trigger buy and sell instead of using indicators?

I would like to do something along the lines of the following:

def next(self):
  if df['Entry'] == True:
   self.buy()
  elif df['Exit'] == True:
   self.sell()

How can I convert a df column to your customized numpy arrays? I tried df.Entry.to_numpy() but this doesn't seem to be the correct format to do the iterative comparisons.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionNot a bug, but a FAQ entry

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions