Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cannot get strategy indicator to line up with chart.

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

    Cannot get strategy indicator to line up with chart.

    I have a very simple strategy that simply adds a data source to a 60 min chart:

    Initialize:

    Code:
    Add("^TICK", PeriodType.Minute, 1);
    OnBarUpdate:

    Code:
    StrategyPlot(1).Value.Set(Closes[1][0]);
    Now this is the result I get:

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    It's apparent that the strategy indicator is somehow out of sync with the chart. BTW, I have not added an SMA or any type of averaging.

    This is how it looks like if I change the PeriodType to 'Seconds':

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    Works great that way. My problem is that I need to build a 60min chart based indicator that gets back-tested for several months. I cannot set the PeriodType to seconds as I can only get about 2 weeks worth of Second interval data from eSignal. So, I need to find a way to make a PeriodType.Minute line up with the chart data. If the indicator somehow uses data that limps behind then my strategy won't work.

    BTW, I tried to be smart and set the PeriodType to 60 minutes - just like the chart:

    Code:
    Add("^TICK", PeriodType.Minute, 30);
    The result was this:

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    Suffice to say I'm a bit confused... Any help would be GREATLY appreciated. If I cannot solve this problem I will have to look for a different type of environment to build my strategy in. Many thanks in advance for any pointers. I'm new to NinjaScript btw - so please forgive me if I'm doing something dumb here

    Thanks,

    Michael
    Last edited by molecool; 01-24-2009, 12:33 AM. Reason: Fixing error

    #2
    Michael,

    You can't expect to add a 1minute series and have it line up with a 60min series. The 60min primary series decides how many data points there will be on the chart. The additional 1minute series has too much granularity that cannot all be displayed.

    Also remember, StrategyPlot() is provided as an as-is solution. There are many limitations with it. NT7 will provide multi-series charting.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick response, Josh. Well, how come the 60min/1sec combo lines up nicely? And the 60min/60min does lag? I do not need a 1min increment and was hoping you would recommend one that works.

      Also, when exactly doe NT7 come out?

      Your insight would be appreciated.

      Thanks!

      Comment


        #4
        molecool,

        The alignment of the bars is complicated. Sometimes switching which series is primary can help. The solution is as-is and if it is unable to do what you want a more elegant solution will be available in NT7.

        NT7 is looking to beta in Q2.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Understood - and I can appreciate the level of complexity involved in doing this.

          Anyway, I will report back if I figure out some sort of work around. Thanks for taking time out of your weekend to respond.

          Michael

          Comment


            #6
            One more thought - I'm still perplexed that a 60min chart does not line up with a 60min indicator. Can you perhaps give me a combination that is proven to work?

            Thanks,

            Michael
            Last edited by molecool; 01-24-2009, 05:25 PM.

            Comment


              #7
              Unfortunately we have no references. What you wish to do, multi-series charting will be addressed in NT7. StrategyPlot is not meant to address multi-series charting.
              RayNinjaTrader Customer Service

              Comment


                #8
                That is very disappointing. FYI - I am representing a group of developers that is working on setting up a large farm of auto-trading systems (I'm talking dozens and eventually hundreds of blackboxes). We have to settle on a platform now, so you are losing a lot of business here. I do like NinjaTrader's C# interface but might have to give TickZoom a shot as it promises to deliver what we need. Even if it doesn't - there's source we have access to.

                Anyway, if there is an early NT7 alpha/beta tester group we would like to be invited. You've got a good system here I think but unfortunately we cannot wait until sometime in Q2 2009 as our milestones are clear.

                Thanks,

                Michael

                Comment


                  #9
                  Michael,

                  There will be a public beta for NT7. Announcements will be made when it is available. Thank you for taking your time and evaluating our software. We look forward to serving your needs in the future.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  558 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  324 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  545 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  547 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X