Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can You Reference Different Time Frames Using The Wizard

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

    Can You Reference Different Time Frames Using The Wizard

    Hi,

    Im looking to reference the daily ATR, so when a market has exceeded its normal average range on the day then one of my conditions is met and the system then executes on an intraday timeframe.

    So on the daily time frame Crude Oil goes an average of 120 ticks say, i want my strategy to have a condition met if we are started to exceed this range.

    I know very little about coding. A few people have asked this question on the forum and havent found the answers particularly helpful as there is a bunch of code written and i dont know what to do with it.

    Is there a way of referencing the Daily ATR in the wizard whilst running the system on an intraday timeframe?

    If hacking the code running in the background is the only way then can you please explain what the code should say and where it should go?

    Thank you very much

    Tom

    #2
    Hello,
    This is not possible through the strategy wizard.
    To do this would need to add in the daily data series for the instrument you want this to run on and then for your check have the ATR use the secondary data series as its input.
    I have provided an example of how you can achieve this below:
    protected override void Initialize()
    {
    CalculateOnBarClose = true;
    Add("ES 12-16" , PeriodType.Day, 1);
    }

    protected override void OnBarUpdate()
    {
    if(ATR(Close[0], 20)[0] < ATR(20)[0])
    //DoSomething
    }
    I would recommend reviewing the following link on working with multiple time frames: http://ninjatrader.com/support/helpG...nstruments.htm
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick response. Looks like i need to learn a lot more of the coding to understand what to do other than just copy and paste that into the script. What language is that? C# or a special Ninja code?

      I understand what the code says, but im not sure if its as simple as just pasting what you wrote (all be it with my own chosen parameters) in the text and it would just work?

      I have built systems on CQG in the past and when they have their indicators in their version of the Wizard its in the format "(ATR @, 30)" and you can change that "@" to your time frame you want to reference.

      So could do "If last > (ATR D, 30) and (stochastics 5, > 80) go short"

      Would be handy if Ninja could add an extra selection on the indicator for what time frame that indicator is derived from if thats possible.

      thanks

      Comment


        #4
        Hello,
        The language we use for indicators and strategies is NinjaScript which is a C# library created by NinjaTrader. If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
        A link to our Help Guide can be found below: http://ninjatrader.com/support/helpGuides/nt7/

        I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://ninjatrader.com/support/helpG..._resources.htm

        You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
        Click here to see our NinjaScript Reference Samples:http://ninjatrader.com/support/forum...splay.php?f=30
        Click here to see our NinjaScript Tips: http://ninjatrader.com/support/forum...ead.php?t=3229

        These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

        There is a also a growing library of user submitted custom strategies, indicators, and addons that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://ninjatrader.com/support/forum...splay.php?f=37

        If you have limited time or programming capabilities, we do have partners through our partner affiliate that may be able to create this for you. Please let me know if you would like to get in touch with one of them.

        The feature to have an indicator calculate based off of a secondary data series has been added to the strategy builder in NinjaTrader 8,.

        There is not a set release date for NinjaTrader 8. NinjaTrader 8 is currently in a beta phase.

        You can install the beta at the following link: http://ninjatrader.com/support/forum...ad.php?t=87190

        Documents to help you get started with NinjaTrader 8 Beta:

        Installation Guide
        Migration Guide
        Connections Guides
        Existing User FAQ
        User Help Guide
        NinjaScript Code Breaking Changes

        Please also make sure to review the general beta information page and what to expect from our Help Guide
        Cody B.NinjaTrader Customer Service

        Comment


          #5
          Thanks for the reply Cody.

          I actually installed Ninja 8. I assume it's ok to use

          Thanks

          Comment


            #6
            Hello,
            Yes NinjaTrader 8 is safe to use. Just keep in mind that it is a beta product. Any questions or bugs you run into with NinjaTrader 8 you would want to ask in the NinjaTrader 8 sections of the forum.
            For information on adding a secondary data series in the strategy builder please see the following help guide link: http://ninjatrader.com/support/helpG...onalDataScreen
            Having an indicator plot off of a secondary data series is very similar to having its plot of an indicator. Please following the instructions on how to have an indicator plot off of another indicator. These steps will be the same you will select Data Series instead of Indicator: http://ninjatrader.com/support/helpG...onalDataScreen
            Cody B.NinjaTrader Customer Service

            Comment


              #7
              Thanks again

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              637 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              366 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              107 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              569 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              571 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X