• 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

%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 RB104, Today, 06:06 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by jtrading82, 05-25-2018, 09:59 AM
    9 responses
    977 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by syxforex, Today, 12:11 AM
    2 responses
    15 views
    0 likes
    Last Post syxforex  
    Started by aslane, Today, 02:31 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by stoner, 10-16-2019, 01:38 PM
    5 responses
    51 views
    0 likes
    Last Post sledge
    by sledge
     
    Working...
    X