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

%Change between two dates

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

    %Change between two dates

    I.e. Like ROC, but where we can specify date1 and date2. Is there an indicator for this, or any pointers about best way to get date (i.e. we need the first bar on each day, I guess)

    #2
    Hello,

    Thank you for the question.

    I don't know of a specific indicator that has exactly those features, you may check on the indicator sharing section on the forum here if you have not already.

    As for creating your own, if it is the ROC you want to change you can duplicate the ROC code into your own indicator and then make the changes you need.

    For the time in NinjaTrader, it is using the C# DateTime object which gives you a lot of options for comparing and working with time. One of the time objects in NinjaTrader is the bar time, Here is a link for the bar time which would be called Time http://www.ninjatrader.com/support/h...htsub=Time%2B0

    This would be how to get each bar time but you want to instead get the first bar on each day. Instead you could use FirstBarOfSession.

    This is a boolean value so you can use this in an if statement so only the code that applies to the first bar of each session would be processed. http://www.ninjatrader.com/support/h...rofsession.htm

    I Assume by first bar of each day you are referring to the start of the session or trading hours and not the actual start of the day at midnight, please let me know if it is not this.

    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    6 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X