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 andrewtrades, Today, 04:57 PM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by chbruno, Today, 04:10 PM
            0 responses
            6 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            436 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            9 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            20 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X