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

Ability to access across different price data in Strategy #50

Closed
ktlim86 opened this issue Sep 18, 2022 · 3 comments
Closed

Ability to access across different price data in Strategy #50

ktlim86 opened this issue Sep 18, 2022 · 3 comments

Comments

@ktlim86
Copy link

ktlim86 commented Sep 18, 2022

Hi,

I was looking at the documentation and I have a use case where I want to compare across different price asset in term of their volatility and rank them accordingly. May I know does Autotrader support this?
Thank you.

@kieran-mackle
Copy link
Owner

Hi @ktlim86,

I am assuming you are asking how to get the prices of multiple assets into a single strategy? If so, the main thing to look for is to set PORTFOLIO: True in the strategy configuration. This will indicate to autotrader that all of the instruments in your WATCHLIST are to be passed into a single strategy bot, rather than to spawn a single bot for each.

After setting PORTFOLIO: True, the data passed to your strategy will contain the prices for all of the instruments in your watchlist.

Does this help?

@ktlim86
Copy link
Author

ktlim86 commented Sep 19, 2022

hi @kieran-mackle ,

that mean if i will to access the data, it will be data["EURUSD=X"] and data["GPBUSD=X"] if i will to assess EURUSD and GBPUSD asset in the generate_signal function? so if i want to do the multi-timeframe, does it mean i can further access by data["EURUSD=X"]["1h] and data["EURUSD=X"]["1d"]?
Thank you.

@kieran-mackle
Copy link
Owner

@ktlim86

Yes, it should be something like that, however I would now recommend simply resampling the data to your desired timeframe(s) from the base data passed in.

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

2 participants