• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MultiData Series Range Bars

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

    MultiData Series Range Bars

    Hey Guys I uploaded a Simple Indicator I'm working on. Its purpose is to Plot a line on a 10 Tick (EUR/USD TenthOfAPiP) Chart, using the High or Low of 50 Tick Chart.

    It does plot a Line on the smaller Chart. But It's a One Bar Line.

    How do I make it Plot a Line From Beginning ("startX") to("endX") using the 50 tick Chart instead of 10 tick chart. I already have the startY endY working perfectly.

    Example of What I want is on the Right
    Example:
    Attached Files

    #2
    Hello ginx10k,

    Thank you for your inquiry.

    Rather than specifying an integer for your startX and endX values, you can use DateTime and utilize this DrawLine overload instead:
    Code:
    DrawLine(string tag, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, DashStyle dashStyle, int width);
    With this overload, you can obtain the times from your secondary Bars object and use this to determine the length of the line drawn.

    You'll be able to pull a DateTime using the Times collection: http://ninjatrader.com/support/helpG...nt7/?times.htm

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      I thought of that method before. But the Range Bar don't have a specific End Time nor Start Time. So I can't have a DateTime startTime,/endTime. Unless there is a specific way to Take the Closing of Previous Bar's Time Somehow?

      Any Thoughts?? Anyone??

      Comment


        #4
        Hello ginx10k,

        Utilizing the Times collection will return a DateTime object denoting the close of the bars.

        For instance, Times[1][0] will return the bar close time of the current bar of the secondary Bars object.

        For more information about using Times, please take a look at the NinjaTrader help guide at this link: http://ninjatrader.com/support/helpG...nt7/?times.htm

        Please, let us know if we may be of further assistance.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Any IDEA why This is NOT Working.

          I've uploaded a simple Script, and it does NOt draw rectangle. I dont' know why.

          I used one single condition for Multi Data Series Range Bar. and I'm testing on 6E 3 tick Range chart. using Default Settings
          Attached Files

          Comment


            #6
            Hello ginx10k,

            You need to be checking CurrentBar < 5 on both Bars objects.

            Example:
            Code:
            if (CurrentBars[0] < 5 || CurrentBars[1] < 5) // checks that we have at least 5 or more bars in BOTH Bars objects before continuing
                 return;
            Please, let us know if we may be of further assistance.
            Zachary G.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by lavalampmj, Today, 05:25 PM
            0 responses
            3 views
            0 likes
            Last Post lavalampmj  
            Started by Antares66, Today, 05:19 PM
            0 responses
            2 views
            0 likes
            Last Post Antares66  
            Started by jmneto, Today, 05:18 PM
            0 responses
            4 views
            0 likes
            Last Post jmneto
            by jmneto
             
            Started by Bobbyj78, Today, 02:21 PM
            2 responses
            14 views
            0 likes
            Last Post bltdavid  
            Started by EnveousColnago, Today, 02:10 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Ariana  
            Working...
            X