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

How to handle multiple time frame Close prices? #1189

Open
Ish2K opened this issue Dec 27, 2024 · 0 comments
Open

How to handle multiple time frame Close prices? #1189

Ish2K opened this issue Dec 27, 2024 · 0 comments

Comments

@Ish2K
Copy link

Ish2K commented Dec 27, 2024

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?

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

1 participant