Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-time frame beginner

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

    #46
    converting code to Ninja 8 format

    Attached is my attempt to convert my little program to Ninja 8 format.

    My one primary object appears properly in my secondary 45 minute series, but does not appear with the 45 minute dimension in the primary series as it did in Ninja 7. Rather, it does the same calculations to draw the line with the bars in the primary series as it did in the 45 minute series.

    Can someone suggest a fix for this?

    To add a bit to this:
    By experimenting with drawIine parameters I found that using zero for startbarsago and -1 for endbarsago it drew the line horizontally where I wanted which was from the middle of bar 2 to the middle of the current bar in the 45 minute time frame. This is mysterious to me. Also if I asked to print High[0] in my program it would give me the high of the second bar in output, not the current bar as expected.

    At age 94 I am somewhat slow at learning this stuff.
    Attached Files
    Last edited by Pete77; 12-12-2016, 06:41 AM.

    Comment


      #47
      Hello,

      I wanted to post an update on this item. It appears that using indexes specifically will cause the exception you are getting, but using a Time does not produce an exception and seems to actually draw. I would still be against suggesting using future times/indexes in general as this concept was never supported to start with.

      Code:
      Draw.Line(this, "Tag2", true, Times[1][0], bp, Times[1][0].AddMinutes(1 * BarsArray[1].BarsPeriod.Value), bp, Brushes.White,DashStyleHelper.Dot, 5);
      Whether or not this produces the identical results as NT7 would be subject to your testing. In either case if this was or was not identical, I could not assist further as this is not really a suggested use.

      Please let me know if I may be of additional assistance.

      Comment


        #48
        Thanks. Your suggested draw.line worked on the 45 min secondary series but not on the primary. I will stay away from trying to use any future data.
        Last edited by Pete77; 12-15-2016, 06:31 PM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X