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 DannyP96, 05-18-2026, 02:38 PM
            1 response
            27 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            117 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            69 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            226 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            417 views
            0 likes
            Last Post CaptainJack  
            Working...
            X