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 Polufson, Today, 01:37 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by mohsemian, Today, 01:36 PM
            2 responses
            9 views
            0 likes
            Last Post mohsemian  
            Started by Derjan, Today, 01:18 PM
            2 responses
            17 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by Cicero, Today, 09:41 AM
            3 responses
            20 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by johnnymustard, Today, 12:01 PM
            2 responses
            12 views
            0 likes
            Last Post johnnymustard  
            Working...
            X