Skip to content

How to handle multiple time frame Close prices? #1189

Closed
@Ish2K

Description

@Ish2K

I have a simple strategy that has entry conditions based on 60mins timeframe and exit conditions based on 15mins timeframe. I have few issues here:

  1. I can't pass two dataframes, so I just passed one dataframe by merging 15mins and 60mins dataframes by adding "_entry" suffix to OHLC columns of 60mins dataframe. So dataframe has columns- Open, High, Low, Close, Open_entry, High_entry, Low_entry, Close_entry.

Here, problem arises when I am trying to enter the position it will take close prices of 15mins which is not accurate. How do I tackle this issue?

  1. If I reverse the process and by having OHLC with suffix for 15mins data and not 60mins data then the similar problem will happen when I will try to exit the trade. It will take 60mins' close price instead of 15mins close price.

Is there a way to accommodate two or more OHLC dataframes? Engine will only consider values of "Close" column when using "buy()", "sell()" or "close()" methods.

Am I missing something here?

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