Code Monkey home page Code Monkey logo

Comments (3)

kieran-mackle avatar kieran-mackle commented on May 23, 2024

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?

from autotrader.

ktlim86 avatar ktlim86 commented on May 23, 2024

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.

from autotrader.

kieran-mackle avatar kieran-mackle commented on May 23, 2024

@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.

from autotrader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.