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 argusthome, 03-08-2026, 10:06 AM
            0 responses
            80 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            46 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            29 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            32 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            66 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X