• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PriorWeekOHLC

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

    PriorWeekOHLC

    It seems that there`s no such function as PriorWeekOHLC to call it via indicator. There`s PriorDayOHLC() for which i have the following formula:

    High[0] >= PriorDayOHLC().PriorHigh[0]

    Is there a workaround to achieve the same for the 'PriorWeek'/PriorMonth?

    Thank you

    #2
    Hello,

    Someone has actually created a PriorWeekOHLC indicator and shared it on our Indicators sharing forum. This may accomplish exactly what you are looking for. You can find this indicator at the link below:

    http://www.ninjatrader.com/support/f...php?linkid=540

    Please let me know if I can assist further.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Dave View Post
      Hello,

      Someone has actually created a PriorWeekOHLC indicator and shared it on our Indicators sharing forum. This may accomplish exactly what you are looking for. You can find this indicator at the link below:

      http://www.ninjatrader.com/support/f...php?linkid=540

      Please let me know if I can assist further.
      Yep.Thanks,Dave,that was very very kind of you!Appreciated.

      Would be also great to have it for the Prior Month,as well.

      thanks again for you quick assistance!

      Comment


        #4
        Hello,

        Yes, that would complete the set, and I'm sure others would find it useful, as well. I'm not seeing any already made, however. If you would like to try to create a monthly version, using the same approach as the daily and weekly indicator, it would be a great tool to share in the Indicators forum.
        Dave I.NinjaTrader Product Management

        Comment


          #5
          Originally posted by NinjaTrader_Dave View Post
          Hello,

          Yes, that would complete the set, and I'm sure others would find it useful, as well. I'm not seeing any already made, however. If you would like to try to create a monthly version, using the same approach as the daily and weekly indicator, it would be a great tool to share in the Indicators forum.
          Thanks,Dave,

          i`m goin to try it.I looked inside the code,and seems it`s not too coplex.There`s one line though,that defines how much days:

          newWeek = Time[0].Date.AddDays(7 - (int)Time[0].DayOfWeek);

          For a Week it`s clear that it`s 7.But how many days you`d add for a Month?Days as we know is not a constant and varies,month after month.

          Comment


            #6
            Originally posted by outsource View Post
            Thanks,Dave,

            i`m goin to try it.I looked inside the code,and seems it`s not too coplex.There`s one line though,that defines how much days:

            newWeek = Time[0].Date.AddDays(7 - (int)Time[0].DayOfWeek);

            For a Week it`s clear that it`s 7.But how many days you`d add for a Month?Days as we know is not a constant and varies,month after month.
            I don`t know if i could make it,but here it is.Maybe someone would take time to check if it`s correct.
            Attached Files

            Comment


              #7
              Hello,

              Thank you for getting that started. There is an AddMonths method for DateTime objects that will probably be the best thing to use, rather than adding days.

              You can view the full script reference for DateTime objects at the link below:

              http://www.ninjatrader.com/support/f...382#post411382

              I will take what you've started and see if perhaps one of our NinjaScript trainees can take a crack at finishing it up and posting it to the Indicators forum. I will keep in touch and let you know if one of them is free to take on this project.
              Dave I.NinjaTrader Product Management

              Comment


                #8
                Originally posted by NinjaTrader_Dave View Post
                Hello,

                Thank you for getting that started. There is an AddMonths method for DateTime objects that will probably be the best thing to use, rather than adding days.

                You can view the full script reference for DateTime objects at the link below:

                http://www.ninjatrader.com/support/f...382#post411382

                I will take what you've started and see if perhaps one of our NinjaScript trainees can take a crack at finishing it up and posting it to the Indicators forum. I will keep in touch and let you know if one of them is free to take on this project.
                Thanks,Dave,

                the link you`ve posted redirect to your very post in this thread.

                Comment


                  #9
                  Oops -- try this one instead: https://msdn.microsoft.com/en-us/lib...vs.110%29.aspx
                  Dave I.NinjaTrader Product Management

                  Comment


                    #10
                    Hello,

                    I have created a PriorMonthOHLC indicator and have shared it in our Indicators sharing forum. You may find it at the link below:

                    http://www.ninjatrader.com/support/f...d=4&linkid=668

                    Please let us know if we may be of further assistance!
                    Zachary G.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_ZacharyG View Post
                      Hello,

                      I have created a PriorMonthOHLC indicator and have shared it in our Indicators sharing forum. You may find it at the link below:

                      http://www.ninjatrader.com/support/f...d=4&linkid=668

                      Please let us know if we may be of further assistance!
                      Thank you,Zachary!

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by StevenNelson, Today, 05:49 AM
                      1 response
                      4 views
                      0 likes
                      Last Post NinjaTrader_PatrickG  
                      Started by fx.practic, Today, 01:41 AM
                      0 responses
                      11 views
                      0 likes
                      Last Post fx.practic  
                      Started by wolfcuring, Today, 01:29 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post wolfcuring  
                      Started by BrandonT1292, 06-17-2019, 03:03 PM
                      2 responses
                      30 views
                      0 likes
                      Last Post thinarthrill  
                      Started by cbentrikin, Yesterday, 07:46 PM
                      1 response
                      11 views
                      0 likes
                      Last Post NinjaTrader_Marco  
                      Working...
                      X