Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Atomated Reload of the strategy

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

    #16
    Sorry to hear that - hopefully you can get this worked out.

    All the best.

    Comment


      #17
      Well, I have received the feedback from the developer.

      He has finally stabilazed the indicator but he mentioned that I should run the strategy with two data series to waranty the sychronisation.
      As I have basic knowledge in programming, could you please advise me on it? Is there any example in the forum on how to do that?
      As you have my code, do you think is difficult to add a second data series into it?

      Best regards,

      Comment


        #18
        oppunzano, adding a series into your strategy shouldn't be too hard, although it would need custom coding outside of the wizard interface. You would call the Add() method in the Initialize to do this -


        For a full working example of a so called MultiSeries script please check into the SampleMultiTimeframe installed per default with NT.

        Comment


          #19
          Hi,

          I am back to you because I found something strange into the chart.

          As you knwo from previous comments, I use two time frame 54m and 9m in my chart which I added through the Data Series in the chart. I also run a strategy based on an indicator which uses the two time frames. This indicator is using internal rules to get the secondary data series and I do not need to specify into the strategy but the selected period for this secondary series.

          As you can see in the attached image from the chart and the Data Box,

          54m Time=8:06
          9m Time=8:15

          This is the strange issue because I though the 54m bar should contain the 9m bars between the previous 54m bar at 7:12 and the current 54m bar at 8:06. However, my chart shows that the next 3 bars of 9m are related to the 54m bar at 8:06 am .

          In consequence, my indicator is giving one information at 8:06 (onbarclose) and it is changing the result during the next 3 bars. This means that what you see in the attached image as blue dot on the bar can change during the next three 9m bars.

          This is impression is confirmed by the historical data because my strategy is getting different results using real or historical data. As I mentioned in previous comments, if I refresh the strategy I get more similar result to the historical data.

          What shall I do to get the 54m bar synchronised with the 9m bars or viceversa?
          Shall I specify something into NT for getting better synchronisation of the data series?
          Is there any way to inform the strategy about this situation? Let say, obliging the strategy to do OnBarClose just at the end of the third 9m bar ater the 54m bar is closed.
          As I am not very good programming strategies I feel unable to solve the situation. Could you please help me?
          Attached Files

          Comment


            #20
            oppunzano, so, the dots you show on the screenshot are from the strategy or the addon indicator you run?

            NinjaTrader would stamp the bars with their closing time and bars building would start in relation to your session template start time - which session template do you run here for the ES, the default CME US Index Futures ETH?

            All the MultiSeries logic is inside your indicator, so the strategy itself would now only run on your primary series. What you could do via a custom counter variable is tracking the bar update calls on a added 9 minute series and execute strategy logic only if it's at bar 3 counting from the last update for the primary 54 minute chart.

            Comment


              #21
              Many thanks for the answer!

              Answering your questions,

              - The dots are generated by the strategy.
              - I use the instruments setting

              Do you have an example to follow your advise? Is there anything similar in the forum?

              Comment


                #22
                Hello,

                For a full working example of a MultiSeries script please check into the SampleMultiTimeframe installed per default with NT by going to Tools-> Edit Ninjascript -> Strategy


                Additionally you may find the following useful when dealing with Time: http://www.ninjatrader.com/support/f...ead.php?t=3226

                For tracking your counter and debugging along the way you would want to use Print() statements to verify values are what you expect - Debugging your NinjaScript code.

                Please let me know if I can be of further assistance.
                LanceNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                85 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                47 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                29 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                32 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                67 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X