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

plotting the same graph, SMA with different time frames

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

    plotting the same graph, SMA with different time frames

    Good morning,
    I would write the code of plotting on the same graph, for example 5 minutes, the SMA (14) and the SMA (14) of a time frame to 10 minutes.
    you can do it?
    Thank you.
    Ciao.
    Roberto

    #2
    Ciao Roberto, yes that would be possible with a so called MultiSeries script - as an example you can check for example into the preinstalled SampleMultiTimeFrame strategy with NinjaTrader.

    The full framework offered for MultiSeries scripting is documented here in detail in our helpguide -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Ciao Bertrand.
      I have already written the code looking at the sample multi time frame. It works perfectly.
      I just wanted to see on the graph, where the code runs, also the SMA different time frames. for example:

      protected override void Initialize ()
      {
      Add (PeriodType.Minute, 10);
      Add (SMA (14)) ;/ / sma time frame "0" 5 minutes
      AddSMA (14) [1], 10); / / sma of the time frame "1" 10 minutes
      }

      Roberto

      Comment


        #4
        Oh, I see - thanks. You could unfortunately not add an indicator on a specific BarsArray in for your Strategy Initialize(). Better would be then adding in a complete MultiSeries indicator that would visualize all your SMA's / timeframes.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          OK
          Tank.
          Roberto

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by knighty6508, Today, 01:20 AM
          1 response
          6 views
          0 likes
          Last Post brucerobinson  
          Started by franatas, Today, 01:53 AM
          0 responses
          1 view
          0 likes
          Last Post franatas  
          Started by knighty6508, Today, 01:17 AM
          0 responses
          6 views
          0 likes
          Last Post knighty6508  
          Started by tierraany, Today, 01:06 AM
          0 responses
          4 views
          0 likes
          Last Post tierraany  
          Started by Wilmarobyi, Today, 12:48 AM
          0 responses
          3 views
          0 likes
          Last Post Wilmarobyi  
          Working...
          X