Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Designing multi-instrument, multi-timeframe

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Designing multi-instrument, multi-timeframe

    I would like some advice regarding a design approach for a complex strategy. (I'm ok with programming, I don't anticipate running into problems I can't handel -- famous last words.)

    Q1. Is it necessary to open a chart to run a strategy?

    Q2. The strategy I am planning involves an single indicator/oscillator derived from from three instruments and trading three other instruments together as a basket. Each of the first three instruments needs two timeframes. There is no obvious bar series (either from the indicator or the basket) that stands out as a preferred default. Do I just pick any one instrument as a default, open a chart and specify one of the time frames? What are the possible/likely unanticipated consequences of this undesired asymmetry between instruments?

    Q3. Do I have to open a separate chart for every instrument I wish to trade? If so, does each chart have to recalculate the oscillator separately? How do I keep the basket in synch?

    Q4. Is it possible to put the complete traded basket on a single chart, together with the oscillator from the non-traded instruments?

    #2
    1) No, see "strategies" tab and related docs
    2) Multi series indicators are not supported at this time. Strategies are though. Does not matter which series is the first
    3) see (1)
    4) No, see (1)

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      1) No, see "strategies" tab and related docs
      2) Multi series indicators are not supported at this time. Strategies are though. Does not matter which series is the first
      Thanks. I see.

      So this raises a question. In my strategy code, how do I know which of the 6 currency pairs I have chosen (from the strategy dialog) as the default first series? Alternatively, how can I make the data series specified in the strategy dialog always be a default choice that the strategy code knows and the user can't change?

      I'm guessing that the answer to both questions is that I can't. And I can live with that answer (uncomfortably). But this irks me as I don't like to sacrifice generality, particularly when it requires me remembering unimportant stuff that I have put into the code (like which indicator pair I must always use for the first series).
      Last edited by mikeyork; 07-07-2008, 04:00 PM.

      Comment


        #4
        1) You don't, you need to just pick one pair to always run on the chart.
        2) Unfortunately this is not supported.
        3) I see your point and will consider if we could support this in the future.
        RayNinjaTrader Customer Service

        Comment


          #5
          Thanks again.

          Now I have some different questions concerning the order of event handling.

          1. I have three instruments each with two Added bar series. The first is a multi-minute bar and the second is an indicator built on the first, but with an OnBarUpdate method called per tick. The OnBarUpdate method for the complete strategy also functions per tick. For any given instrument, which OnBarUpdate method gets called first? (In other words, how do I know if the indicator has already been updated when the strategy method is called?)

          2. If a tick coincides with a bar close, which event triggers OnBarUpdate first, the bar close or the tick?

          3. Are my questions materially irrelevant?

          Comment


            #6
            Indicators will always be current as your strategy calls them. A tick is the source for determining when a bar is closed. Your questions are irrelevant.
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by helpwanted, Today, 03:06 AM
            1 response
            14 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            11 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            6 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            244 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            387 views
            1 like
            Last Post Gavini
            by Gavini
             
            Working...
            X