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

Session ATR

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

    Session ATR


    Am I approaching this the right way?

    I restrict trading on a 15 minute chart to a daily session that has a start time and an end time.

    I want to create an ATR Series<double> based on this session

    so based on the ATR indicator

    high0 = high of session
    low0 = low of session
    close1 = last 15 minute bar close​

    #2
    Hello fingers,

    Do you want a custom Trading Hours template that restricts the data to a custom set of hours?

    Are you wanting to add a 1 day series to use as the input series for the ATR indicator?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      my initial idea was to keep it self-contained in the code by accumulating the high, low and close of each session and when I have at least 14 then I can start calculating the ATR in the code?

      Comment


        #4
        Hello fingers,

        You might be able to create a custom method that calculates the ATR instead of using the indicator.

        Unfortunately, I would not be able to advise of the custom logic to achieve that, but you could use the ATR indicator to get an idea of the calculation.

        This thread will remain open for any community members that would like to create the custom logic as a convenience to you.

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          all ok and thanks.

          out of interest:

          1. does the session template restrict daily/weekly/monthly data outside start and end times?

          2. can the session template be modifies in an NT8 script?
          Last edited by fingers; 11-28-2023, 10:24 AM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ETFVoyageur, Today, 07:55 PM
          0 responses
          6 views
          0 likes
          Last Post ETFVoyageur  
          Started by janio973, Today, 07:24 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by aligator, 01-06-2022, 12:14 PM
          4 responses
          242 views
          0 likes
          Last Post john_44573  
          Started by reynoldsn, Today, 05:56 PM
          0 responses
          13 views
          0 likes
          Last Post reynoldsn  
          Started by bortz, 11-06-2023, 08:04 AM
          51 responses
          1,996 views
          0 likes
          Last Post aligator  
          Working...
          X