• 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

Multi Timeframe Strategy Creation

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

  • NinjaTrader_Jesse
    replied
    Hello demo166130,

    The terminology used in this specific syntax you can reference in the help guide page that describes multi series use in the platform. This is one of the links from post #4.

    The sample also uses if(BarsInProgress == 0) meaning that the sample is being run on the primary series only.

    The first use of CCI will be referencing the primary series.
    The second use of CCI the BarsArray[1] is passed to the indicator meaning it is using the secondary data.
    The third use references BarsArray[2] meaning it uses the third added series.

    If you wanted to use 15 range bars, you would need to Add with 15 range bars, and then use the index for that series in the order you added it.

    From the help guide sample:
    our primary Bars is set from a MSFT 1 minute chart
    MSFT 1 minute Bars is given an index value of 0
    In the Initialize() method we added a MSFT 3 minute Bars object and an AAPL 1 minute Bars object to the script
    MSFT 3 minute Bars is given an index value of 1
    AAPL 1 minute Bars is given an index value of 2

    Using this example, if you replaced the 3 minute MSFT instrument, the BarsArray used would be BarsArray[1]

    I look forward to being of further assistance.

    Leave a comment:


  • demo166130
    replied
    Originally posted by NinjaTrader_Jesse View Post
    Hello demo166130,

    Thank you for the reply.

    I updated the information in the last post for nt7, regarding multi timeframe development I would suggest looking at the link "Multi timeframe development in NinjaScript". Adding multiple timeframes and accessing indicators on those timeframes is something you do in the code of the script and is also related to the structure of how the script is formed.

    A simple example is shown on the Multi timeframe development in NinjaScript page in the "Using Bars Objects as Input to Indicator Methods" section.

    Code:
    if (CCI(20)[0] > 200 && CCI(BarsArray[1], 20)[0] > 200
    && CCI(BarsArray[2], 20)[0] > 200)
    {
    // Do something
    }

    I look forward to being of further assistance.
    In the above example, which of the values relates to the timeframe in bars, and which relate to the indicator values? How do we stipulate we want to use 15 Range bars? This might be a step beyond my mental capabilities but It's worth a try.

    Leave a comment:


  • demo166130
    replied
    I think you think I think you think too smart. I think

    Leave a comment:


  • bltdavid
    replied
    Originally posted by demo166130 View Post
    Unfortuntely, I haven't managed to find the specific information relating to exactly how you tell the strategy analyzer to refer to higher timeframe indicators in making decisions. Could you possibly point me in the right direction?
    I think you mean Strategy Wizard.

    Strategy Wizard allows non-coders to create basic strategies.
    (Tools -> New NinjaScript -> Strategy)

    Strategy Analyzer is used to test already created strategies.
    (File -> New -> Strategy Analyzer)

    Nowadays, the Strategy Wizard is also referred to as Strategy Builder.
    Attached Files
    Last edited by bltdavid; 11-06-2018, 04:42 AM.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello demo166130,

    I am sorry if there was any confusion, I had not implied this was possible using only the user interface in the analyzer. I had previously mentioned it is possible for the analyzer to test scripts that include multiple timeframes or indicators that reference those timeframes. This is still something you need to program toward your goals.

    In the NT8 strategy builder it is possible to add secondary data, in NT7 this is strictly a manually coded item.


    I look forward to being of further assistance.

    Leave a comment:


  • demo166130
    replied
    I think you previously implied this is also possible in the strategy builder without C#. How would you implement multiple timeframe reactions using this?

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello demo166130,

    Thank you for the reply.

    I updated the information in the last post for nt7, regarding multi timeframe development I would suggest looking at the link "Multi timeframe development in NinjaScript". Adding multiple timeframes and accessing indicators on those timeframes is something you do in the code of the script and is also related to the structure of how the script is formed.

    A simple example is shown on the Multi timeframe development in NinjaScript page in the "Using Bars Objects as Input to Indicator Methods" section.

    Code:
    if (CCI(20)[0] > 200 && CCI(BarsArray[1], 20)[0] > 200
              && CCI(BarsArray[2], 20)[0] > 200)
             {
                  // Do something
             }

    I look forward to being of further assistance.

    Leave a comment:


  • demo166130
    replied
    Im also using NT7 and all he info you provided related to NT8. Perhaps this comment was incorrectly placed. Im sure you'll let me know if so.

    Leave a comment:


  • demo166130
    replied
    Unfortuntely, I haven't managed to find the specific information relating to exactly how you tell the strategy analyzer to refer to higher timeframe indicators in making decisions. Could you possibly point me in the right direction?

    Regards

    Leave a comment:


  • demo166130
    replied
    That's plenty, thanks for the help and resources.

    Regards

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello demo166130,

    Yes, the analyzer can test multi-timeframe or multi-instrument strategies which include indicators. This would need to be developed using either the builder or in manual coding.

    I would suggest watching our strategy builder webinar as that outlines a good portion of the content surrounding strategy development and testing.

    There are also two scripts included with NinjaTrader called SampleMultiTimeFrame and SampleMultiInstrument that shows the required manual coding syntax.

    I do want to note that the builder specifically has limitations surrounding how it handles multi-time frame scripts, the added timeframes would mainly be used for indicators or prices. In manaul coding you can take advantage of the multiple timefames/instruments in more complex ways.

    The following resources would all be helpful toward learning about both strategies and multi timeframes.

    Strategy analyzer: https://ninjatrader.com/support/help...y_analyzer.htm
    Strategy builder: https://ninjatrader.com/support/help...egy_wizard.htm
    Strategy builder webinar: https://youtu.be/MaaqCBoqYxI
    Multi timeframe development in NinjaScript: https://ninjatrader.com/support/helpGuides/nt7/multi_time_frame__instruments.htm?zoom_highlightsu b=multi

    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 11-05-2018, 08:43 AM.

    Leave a comment:


  • demo166130
    replied
    What I'm getting at is whether it's possible to create a strategy using the analyzer that takes into account multiple indicators across multiple timeframes? And if so, is there any useful info pertainign to how.

    Thanks

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello demo166130,

    This is really up to your trading goals. You do not need to use multiple time frames or test across more that one but you can if you would like to see how the logic performs in those situations. This is something you would need to test to satisfaction of your own goals. NinjaTrader does allow for trading a single time frame or multiple, it would depend on what you want.

    NinjaTrader uses specifically C# for its NinjaScript language so there would not be a way to accomplish creating a strategy in the platform without using C#. You can use the strategy builder which is a GUI interface but that still just generates C# code in the overall scope of what is happening.





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

    Leave a comment:


  • demo166130
    started a topic Multi Timeframe Strategy Creation

    Multi Timeframe Strategy Creation

    Hi,

    Presumably a successful automated strategy needs to be configured across multiple timeframes? Curious to know if this is diffcult to do, and whether anyone has managed to do this without the use of C#

    Look forard to replies...

Latest Posts

Collapse

Topics Statistics Last Post
Started by hiikila, Today, 02:40 AM
0 responses
1 view
0 likes
Last Post hiikila
by hiikila
 
Started by Beauregard, Yesterday, 11:50 PM
0 responses
12 views
0 likes
Last Post Beauregard  
Started by renkodan, Yesterday, 11:56 AM
1 response
7 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by J_o_s, 04-04-2020, 11:17 PM
1 response
8 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by thetickfarmer, 04-04-2020, 04:44 PM
2 responses
20 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X