• 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

NinjaScript Strategies vs Indicators

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

    NinjaScript Strategies vs Indicators

    I am looking for some clarification on when to use strategies vs indicators above and beyond the obvious trading and position management functionality. Take for example Multi-Timeframe and Instrument methods that appearonly to beavailable tostrategies.But what if I wanted to develop an indicator that shows a higher timeframe (compressed series) trend or another instrument close[0]as an indicator overlayed on the current chart? Would I have to implement this "indicator" as a strategy? This would be okay, except other useful features likeChartTrader do not allow concurrent use of strategies.

    Are there other important difference between strategies and indicators (beyond the obvious) thatcan be highlighted? For example, can strategies do everything an indicator can do and then some?

    Regards,

    Whitmark
    whitmark
    NinjaTrader Ecosystem Vendor - Whitmark Development

    #2
    imported post

    The docs provide pretty in depth info on that issue. Please see NinjaScript->Developing Custom Strategies->Multi-Time Frame & Instruments

    Some notes:
    - yes, you can run an indicators on a higher timeframe (see samples in the docs)
    - however, only indicators on the primary series are visualized on chart, since a chart only holds the primary data series of a strategy
    - multi series in a strategy mean you just have a different timeframe on the instrument or even different instruments (which different timeframes).

    Not sure what other differences to highlight...
    DierkNinjaTrader Customer Service

    Comment


      #3
      imported post

      Thanks Dierk,

      When I try to implement as an indicator and add in the Initialize() section:

      Code:
      CompressBarSize = 300;
      Add(PeriodType.Tick, CompressBarSize); // BarsInProgress(1)


      and then add in the OnBarUpdate() section:

      [font="Courier New"][color=#0000ff][size=2]
      Code:
      if (BarsInProgress == 1)
      { 
      Plot0.Set(Close[0]);
      }
      But when I try to compile I get the following errors:

      No overload for method 'Add' takes '2' arguments
      The name 'BarsInProgress' does not exist in the current context

      Perhaps I need to add an object in the using declarations to get this to workin an indicator vs strategy. Please advise.

      Thanks,

      Whitmark

      whitmark
      NinjaTrader Ecosystem Vendor - Whitmark Development

      Comment


        #4
        imported post

        another data point . . .

        http://ninjatrader.mywowbb.com/forum14/1835.html
        whitmark
        NinjaTrader Ecosystem Vendor - Whitmark Development

        Comment


          #5
          imported post

          You are trying to write an indicator for a multiple series setup. This does not work, since indicators only support one series.

          Here is the apporach you need to take:
          - implement your indicator. Note: It only can run on one (!) data series
          - access your indicator in a multi series startegy as per doc reference below
          DierkNinjaTrader Customer Service

          Comment


            #6
            imported post

            Thanks Dierk,

            Itsgood to know that indicators take a single data series and strategies can take multiple data series of differing time-/tick-frames and instruments.But how would I go about enabling the concurrent use of ChartTrader if its implemented as strategy? I suspect there are other discretionary traders that are interested in multiple-timeframe or multiple-instrument "indicators"yet have no intention of system trading anddon't want to give up ChartTrader. Perhaps this should be logged as a enhancement request for a multiple data-series class of indicator or a ChartTrader compatable class of strategy.

            The event driven capabilities in Ninja arepretty slick with a lot of potential,perhaps even more than myother trading platform that allows multiple data series indicators through data synchronization to the nearest second or compression of the primary series to a given multiple.I am not crazy about the idea of potentually giving upthe use of theChartTrader feature that got me interested inusing Ninja Charts/Scripts in the first place.

            Regards,

            Whitmark



            whitmark
            NinjaTrader Ecosystem Vendor - Whitmark Development

            Comment


              #7
              imported post

              Will add enabling chart trader while running a strategy as an enhancement. Give it some time to see what people want in this area.

              Ray
              RayNinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Ray View Post
                Will add enabling chart trader while running a strategy as an enhancement. Give it some time to see what people want in this area.

                Ray
                This would be usefull, because limit and stop orders are displayed. I sometimes open two charts on the same unterlying and timeframe: one for the strategy and one for the chart trader, to visualize the currently working orders.

                I would be happy if you enable chart trader for charts running a strategy.

                thx
                Nathamus

                Comment


                  #9
                  Hello gplatis,

                  Thanks for your post.

                  The functionality of chart trader and strategy on the same chart has been incorporated in the new platform NinjaTrader8.

                  NinjaTrader8 was developed with over 500 user suggested improvements and enhancements. Here is a link to "what's new in NinjaTrader8": http://ninjatrader.com/support/helpG...?whats_new.htm
                  Paul H.NinjaTrader Customer Service

                  Comment


                    #10
                    Hello gplatis,

                    Thanks for your reply and feedback.
                    Paul H.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by ksarin, Today, 12:39 PM
                    3 responses
                    10 views
                    0 likes
                    Last Post NinjaTrader_PatrickG  
                    Started by ttodua, Today, 12:03 PM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by tomtr27, Today, 11:35 AM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by Uregon, Today, 07:30 AM
                    2 responses
                    13 views
                    0 likes
                    Last Post bltdavid  
                    Started by Induna, 02-20-2020, 05:38 AM
                    4 responses
                    26 views
                    0 likes
                    Last Post NinjaTrader_Kate  
                    Working...
                    X