Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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:



                    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:



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

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by timmbbo, 07-05-2023, 10:21 PM
                      3 responses
                      150 views
                      0 likes
                      Last Post grayfrog  
                      Started by Lumbeezl, 01-11-2022, 06:50 PM
                      30 responses
                      804 views
                      1 like
                      Last Post grayfrog  
                      Started by xiinteractive, 04-09-2024, 08:08 AM
                      3 responses
                      11 views
                      0 likes
                      Last Post NinjaTrader_Erick  
                      Started by Johnny Santiago, 10-11-2019, 09:21 AM
                      95 responses
                      6,193 views
                      0 likes
                      Last Post xiinteractive  
                      Started by Irukandji, Today, 09:34 AM
                      1 response
                      3 views
                      0 likes
                      Last Post NinjaTrader_Clayton  
                      Working...
                      X