Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Feedback So Far

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

    Feedback So Far

    Hi,

    Haven't really had a whole lot of time to play around yet, and have so far just converted an indicator and strategy from NT7 to NT8. Planning to check out the new Strategy Analyzer, convert a few more indicators/strategies and paper trade the converted strategies over the next few days.

    Some thoughts so far:

    1. Perhaps NinjaScriptProperty (i.e. declaring input parameters for Indicators and Strategies) should be listed under the list of code breaking changes? Detailing how to go from the old to the new:

    Code:
    [Description("Stop loss in basis points?")]
    [GridCategory("3. Stock Models")]
    public double StopLossBps
    {
         get { return stopLossBps; }
         set { stopLossBps = Math.Max(0, value); }
    }
    
    [Range(0, double.MaxValue), NinjaScriptProperty]
    [Display(ResourceType = typeof(Custom.Resource), GroupName = "3. Stock Models", Order = 6)]
    public double StopLossBps
    { get; set; }
    2. Days2Load which is now DaysToLoad is also not listed under code breaking changes.

    3. Moreover, in NT7 these parameters (Days2Load, CalculateOnBarClose, ExitOnClose, etc.) were put in Initialize(). Am I correct that the equivalent of doing that is now to put them in State.SetDefaults within OnStateChange() as opposed to State.Configure (which is supposedly the equivalent of Initialize() - doing this seems to display the default parameters, then overwrite them when the strategy is actually run/backtested). Maybe this could be clarified in one of the help files.

    Some other minor feature requests which I would find useful:

    4. Have a "Open/Show in Explorer" option in the right click context menu within NinjaScript Explorer, as I still like manipulating files using Windows Explorer as it allows sorting and is also easier (in my opinion at least) to create folders and move stuff around.

    5. Perhaps implement a dual view option for NinjaScript Editor, such as in the case of the output window, with synchronized scrolling etc. At the moment, you can always open two copies of Editor and use Windows+Left and Windows+Right to have them side by side, but for me, it feels more difficult to manipulate files between the left and right Editor in this scenario, and having NS Explorer pinned on both instances limits the space remaining to work with.

    Thanks

    #2
    Hello wuileng,

    Thank you for your feedback.

    1. The Attribute tags will be further expanded in the help guide, however, I will send a note to development about adding this to the code breaking changes.

    2. Days2Load was not part of the NinjaTrader 7 help guide and is not supported by NinjaTrader support to use so this is not included in the code breaking changes. I ran this by development to see if we can add this specifically to the code breaking changes and they decided against this as this not documented in NT7 and would not count as a code breaking change. However, this property DaysToLoad can be used in the NT8 strategy framework and we will look at providing further documentation within the help guide for this newly supported property within the strategy section of the help guide.

    3. CalculateOnBarClose, ExitOnClose, are settings that would be pushed to the UI and would be put in the SetDefaults state as outlined in the code breaking changes document in the NT8 help guide.

    4. I have forwarded a feature request to add open in File Explorer to the context menu of the NinjaScript Explorer pane.

    5. I have also forwarded a feature request to have a split pane view that allows each pane to scroll in sync with the other pane.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks wuileng for taking the time to post feedback.

      Comment


        #4
        While converting strategies, some more things I've noted which were not documented in the code breaking table:

        1. InstrumentType.Currency is now InstrumentType.Forex.

        2. Bars.Session.TimeZoneInfo is now Bars.TradingHours.TimeZoneInfo (?)

        Regarding a few other issues:

        3. Do you plan to support Bars.IsLastBarOfSession in NT8? I suppose this isn't that important as the new Bars.TradingHours.Sessions.EndTime could provide similar functionality, but was just wondering.

        4. Is there any chance N-th month continuous futures could be supported in NT8? What I mean by this is if the current continuous futures contract is the front month, could we also have a second, or third month continuous futures contract which takes the second or third month contracts on a rolling basis? If this is data provider specific, perhaps give us the option to "create" these contracts by specifying date ranges and the appropriate contract's data to use?

        I'm sure others might have suggested this before but this would allow users to backtest futures strategies based around term structure (i.e. contango/backwardation) which is something I feel is lacking in NT, and would be great to have. The real benefit would be for backtesting though, as the actual contracts would probably have to be defined anyway for live trading.

        5. Another thing I felt was lacking in NT7 was the fact that the analysis was done on a trade by trade basis, as opposed to grabbing daily P&L values (or at least be given this option). While this is fine for most strategies, this also meant that if I wanted to know the real drawdowns and performance of my swing/longer-term strategies, I would have to export values to Excel and manually do my own analysis there - which was a shame considering you had this great platform already. Any thoughts if something like this could be made available in NT8?

        6. Love the Slate Gray skin generally, but still can't get my head around coding with a gray background in NS Editor. Any chance you might let us change the background for NS Editor independently so that we can use the skin, but have the regular white background and text colors for NS Editor?

        Thanks
        Last edited by wuileng; 05-15-2015, 05:08 AM.

        Comment


          #5
          Hello wuileng,

          Thank you for this additional information you have taken the time to write up.

          1 & 2. I've forwarded these to project management to get these added.

          3. The issue with providing a last bar of session is that this would be universal to all bar types and would be specific with time based bars. A tick based bar like renko, range, tick, these we have no way of knowing if that is the last bar until the session actually closes. This means we would not be able to provide a signal that this is the last bar as we would not have been able to determine this.

          I will however, go ahead and submit a feature request to add this functionality. It will be up to the developers to decide to implement this and will likely be implemented in a future version of NinjaTrader.

          4. I not quite understanding how a continuous contract that has a changable amount of days would work. Can further detail this? How would the expiry months be put together in this senario?

          Also, can you detail how having the merge policy set to MergeBackAdjusted does not already accomplish this?

          5. The Analysis tab when the Period is set to Daily gives you the performance for that trading day. I am not understanding when you mention "the analysis was done on a trade by trade basis, as opposed to grabbing daily P&L values". Can you explain how this is trade by trade values and not the daily performance?

          6. Custom skins are supported in NT8 and you can make any skin you want for NT8. Are you finding that you are unable to change the background of the NinjaScript editor? (Search "creating your own skin" in the NT8 help guide)
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_ChelseaB View Post
            ...
            6. Custom skins are supported in NT8 and you can make any skin you want for NT8. Are you finding that you are unable to change the background of the NinjaScript editor? (Search "creating your own skin" in the NT8 help guide)
            The documented procedure does not appear to be working. At least, I am not seeing the new skin, which is just a copy of an existing skin. All I did was copy the "Light" skin to another name. I have restarted NinjaTrader 8 multiple times, and the only skins showing are the original three listed.

            I posted a new thread about this.

            Comment


              #7
              Hi koganam,

              Thanks for your post.

              I am giving this a test now. If I run into issues i'll put in a bug report about this.

              Thank you for letting me know there may be an issue here.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                4. I not quite understanding how a continuous contract that has a changable amount of days would work. Can further detail this? How would the expiry months be put together in this senario?

                Also, can you detail how having the merge policy set to MergeBackAdjusted does not already accomplish this?
                If I want to test a strategy on CL futures which goes long when the term structure (e.g. the second month future minus the front month future) is in backwardation (and short when in contango). At the moment, I can trade this strategy live (by defining the second month future as CLM5 and the front month future as CLN5), but have no easy means of backtesting it over a long period using NT. CL ##-## exists, which accurately represents the front month, but at the moment there is nothing I can do to get say CL ##-##-2 which would represent the second month continuous contract on a historical basis.

                I'm not sure if the continuous futures are synthetically created by NT or if they are obtained from the data provider, but if it is the former, it would be easy - just need to repeat the same logic but skip the closest future (use the second one instead, and roll that to the third when the first one is rolled to the second). In doing so, there would be some discontinuity of course, but this can be rectified by applying the same merge rules.

                So in January 2015, if CL ##-## represents the February 2015 futures, CL ##-##-2 would represent the March 2015 futures.

                After the roll date, and CL ##-## moves to represent the March 2015 futures, CL ##-##-2 would roll as well and represent the April futures.

                This would allow users to add CL ##-## and CL ##-##-2 into strategies which we could use to backtest futures term structure based strategies.

                5. The Analysis tab when the Period is set to Daily gives you the performance for that trading day. I am not understanding when you mention "the analysis was done on a trade by trade basis, as opposed to grabbing daily P&L values". Can you explain how this is trade by trade values and not the daily performance?
                I've attached a screenshot which details an example. The following is a strategy which buys SPY near the start of the backtest and holds it till the backtest ends.

                This backtest has one winning trade, though obviously the path taken to get there wasn't a straight line. What it shows is that (as in NT7), the analysis is only updated when trades are closed/partially closed - therefore on a trade by trade basis.

                In reality, there would be intra-trade drawdowns (unrealized losses) and the Cumulative Net Profit graph should reflect a chart of SPY from January to May, rather than what is shown in the attached screenshot.

                In NT7, for my longer term strategies, I had to manually track my equity values using variables and output them to a CSV at the end of each day. I then had to run macros on that data to analyze it, making it a tedious multi-step process. I was hoping this could be improved in NT8 as it would make developing swing strategies, stock/future rotation models as well as longer term trend following models much much easier.

                7. Also, following on from my previous point, I think it would be great for developing portfolio/rotation strategies if the "Combined results" when backtesting Instrument Lists could be expanded to provide more detailed analysis.

                Perhaps all the TradeCollections for the various instruments in that list could be combined into a temporary one which is then used to create graphs of Cumulative Net Profit, Max Drawdown, etc.

                If you have a strategy which runs on a rather large Instrument List (and has a large combined total but only does 1-2 trades per instrument), it is a lot more meaningful if the combined equity curve could be built in NT8 (without having to output into a CSV and analyzing it manually) as opposed to having a bunch of graphs for each instrument which might look like the screenshot I attached.

                Thanks again for your help and consideration!
                Attached Files

                Comment


                  #9
                  Hello wuileng,

                  Just to clarify point 4, you want to be able to control the rollover dates used to stitch together the continuous contract and not use the rollover dates that are set in NinjaTrader, is this correct?

                  This will not be possible with a continuous contract as this data is obtained directly from many data providers. (NinjaTrader creates this for any connection that does not provide the data directly. The majority of feeds do provide this. Since some do, we will not be able to make this change.)

                  However, what you could do, is make a new instrument with a similar name (unique name though). Then export the data from the original symbol and then re-import this under the new symbol. This would allow you to customize the rollover dates to anything you would like without modifying the original instrument's rollover dates.


                  Just to clarify point 5, you want to be able to see the performance of open trades that have not closed, is this correct?

                  Would these positions be repeated on every day until the order closes? (I imagine this will create a ton of entries in this view. So if there are 10 open trades over 10 days, this will result in 100 rows of information correct?)
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Regarding point 4, to me it's not so much being able to control rollover dates as much as having a feature by which a more distant (i.e. second/third etc.) month rolling contract could be created automatically and used for backtesting/strategy development. If NT already has the ability to create continuous front month contracts for providers who do not provide this directly, would it be possible to extend the same functionality but using more distant futures instead?



                    Regarding point 5, yes, it would be a huge improvement if users were given the option to consider open trades' performances in the Strategy Analyzer.

                    For many people who trade longer term strategies such as rotation/portfolio based strategies, I don't think the individual open trades performances (i.e. on a standalone basis) are that important. What we really want to know is how the strategy as a whole is doing.

                    Therefore, it could be simplified to perhaps aggregate the total open P/L across strategy positions (maybe once per day, synced to the close of the primary series?). This way, regardless of the number of open trades, we'd just see one line per day, and have graphs in "Analysis" which are representative of this.

                    Thanks again!

                    Comment


                      #11
                      Wuileng,

                      Just want to clarify to make sure we are on same page. NT7 and NT8 already creates continuous contracts. Go to control center > Tools > Options > and in NT7 the data tab in NT8 the Market Data tab and make sure Merge policy is set to Merge Back Adjusted.

                      With this settings with ES 06-15 for example you request 360 days back of minute data. We will automatically merge in the ES 03-15, 12-14, 09-14, etc going back to get a continuous contract. The dates for which the merges occur are set in tools > instruments > edit an instrument and edit the contracts definitions. (Misc tab near the bottom for NT7).

                      Is this what your looking for or you looking for something else?

                      Comment


                        #12
                        Hi Brett,

                        What I am looking for is a means of applying the continuous contract logic which NT already has to create new futures continuous contracts but with custom "spacing".

                        Using your example of ES ##-##, I would like the option to be able to create a custom instrument (say ES ##-##-2) which uses the data from two futures in front (rather than the closest future). For simplicity's sake, these new contracts could use the same rollover dates as the originals.

                        What this means is while ES ##-## is currently using data from ES 06-15, the custom instrument ES ##-##-2 would instead be referring to ES 09-15. Back in January, when ES ##-## was using the data from ES 03-15, ES ##-##-2 would have been using the data from ES 06-15, and so on. As you can see, while the original continuous contract uses the closest contract, the custom one always skips that one, and uses the next.

                        This would open a whole new window of opportunities in the commodity, volatility and short term interest rate markets as we would be able to develop and test strategies/indicators based on term structure within NT. I don't think it would be a huge amount of work either, as the continuous contract framework already exists and all that really needs to be added is the ability to create additional continuous contracts with different "spacings".

                        Comment


                          #13
                          Ok so just to make sure I understand:

                          Normal Behavior:

                          ES 12-14 (09/2014 - 12/2014) | ES 03-15 (1/2015 - 3/2015) | ES 06-15 (3/2015 - 6/2015)

                          New Behavior:

                          ES 03-15 (09/2014 - 12/2014) | ES 06-15 (1/2015 - 3/2015) | ES 09-15 (3/2015 - 6/2015)

                          Finally to make sure I'm on the same page is that really usefull? Since the data you would be viewing would be inactive non-front month trading with low volume. This is what your after correct?

                          Comment


                            #14
                            That's exactly what I'm looking for!

                            It would be useful in my opinion, perhaps not in equity futures, but definitely if you look at VIX futures and certain commodity futures (mostly energy and ags) where the steepness in term structure is significant.

                            For example, here are some links to academic literature/articles detailing term structure strategies:




                            Thanks again.

                            Comment


                              #15
                              I completely agree with wuileng's request. The term structure in several commodity contracts has a significant impact on price/trading - e.g. in current terms crude has to overcome ~16% contango just for spot prices to break-even. Having the ability to compare the constant front contract via the ##-## function to a constant 2nd or 3rd contract will give those of us trading these futures a much better picture.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by usglucofreeze, Today, 01:19 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post usglucofreeze  
                              Started by f.saeidi, Today, 01:12 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post f.saeidi  
                              Started by NinjaTrader_ChelseaB, 03-14-2017, 10:17 AM
                              227 responses
                              34,318 views
                              7 likes
                              Last Post rare312
                              by rare312
                               
                              Started by f.saeidi, Today, 12:11 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post f.saeidi  
                              Started by Graci117, Yesterday, 11:40 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post Graci117  
                              Working...
                              X