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

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...

    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

          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 Christopher_R, Today, 12:29 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post Christopher_R  
                    Started by sidlercom80, 10-28-2023, 08:49 AM
                    166 responses
                    2,235 views
                    0 likes
                    Last Post sidlercom80  
                    Started by thread, Yesterday, 11:58 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post thread
                    by thread
                     
                    Started by jclose, Yesterday, 09:37 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post jclose
                    by jclose
                     
                    Started by WeyldFalcon, 08-07-2020, 06:13 AM
                    10 responses
                    1,415 views
                    0 likes
                    Last Post Traderontheroad  
                    Working...
                    X