Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order cancelled

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

    #16
    Hello tb_123,

    Thanks for your reply.

    I would recommend that you make a variable (int) to store the CurrentBar number (for the BarsInProgress the cross happens over). In my example I'll call this crossBar.

    Then to get the bars ago value for this bar on a later bar use CurrentBar - crossBar.

    For example, to see the Close of the crossBar:

    if (CrossAbove(Close, SMA(19))
    {
    crossBar = CurrentBar;
    }

    Then later:

    Print(Close[CurrentBar-crossBar].ToString());


    Please let me know if this does not resolve your inquiry.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      hi patrick,

      i was wondering....
      if you think of an alternative direction, now that you know more of the details...let me know your thoughts in this regard as well...

      looking forward to hearing any recommendations you have...

      thx, tb

      Comment


        #18
        hi patrick,

        sounds like a solution...i'll head in that direction

        have a great extended weekend!
        thx for ALL your help,
        tb

        Comment


          #19
          Hello tb_123,

          I think the method you are attempting will work fine.

          For example lets say BIP (BarsInProgress) 0 is a minute interval and BIP 1 is a tick interval:

          if (BarsInProgress == 1)
          {
          if (CrossAbove(Closes[0], SMA(BarsArray[0], 19))
          {
          crossBar = CurrentBar;
          }
          }

          This is just an example but may offer some insight.


          Please let me know if this is not helpful.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            thx chelsea.....
            you have a great weekend too!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            117 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            166 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            85 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            130 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            88 views
            0 likes
            Last Post PaulMohn  
            Working...
            X