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

Creating Automated Trading Strategy from Proprietary Indicator

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

    Creating Automated Trading Strategy from Proprietary Indicator

    Hi,
    I own a proprietary indicator called AbleTrend (the NinjaTrader add on version https://www.wintick.com/products/ninjatrader) from Wintick. I'm trying to create an automated strategy using this indicator. However, when I reached out to their tech support they said that it couldn't be done because NinjaTrader 8 does not support building strategies from indicators. Attached is the exact exchange with them. Could you please clarify?
    Thanks,
    CV


    #2
    Hello chaitunt,

    Thank you for your post.

    That's not correct, you are able to utilize indicators within your strategies when using NinjaTrader.

    Some indicators do not expose their plots and cannot be used in the Strategy Builder or in a strategy or simply do not have plots to be exposed. Also, as some third party indicators require additional data series to be added to function properly, those may not work as well. As I do not have access to AbleTrend as it is a third party indicator, I would not be able to advise whether or not it would be usable in the Strategy Builder.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Kate:
      Thanks for the reply. As the attached chart shows, I can see the plots from the indicator (AbleTrendTS) in Data Box. (The chart has 2 instances of the indicator, one off of 15 minutes data and the other off of 45 minutes data.) Does it mean the indicator can be used in a strategy? Please let me know your thoughts. Also, please let me know if you need any other information to find out more about this indicator.
      Thanks much for your help and guidance.
      CV

      Comment


        #4
        Hello chaitunt,

        Thank you for your reply.

        An indicator that exposes plots to the data box in theory would likely be usable in a Strategy. However, there are other factors, like additional data series, that may be in play. For the best information on whether a particular indicator could be used in a strategy, the best source of information would be the vendor you got the indicator from.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Hi Kate,
          Thank you for the reply. Unfortunately, the vendor hasn't been very helpful. Their general position is against strategies and in favor of manual trading. That said, if you could guide me on how to get started trying to use this indicator in a strategy probably we can arrive at specific questions for the vendor to address as and when we get stuck. FYI, this indicator has cost me several thousand dollars and I really need to build this strategy to make it worthwhile. Thanks much for your support.
          -CV

          Comment


            #6
            Hello chaitunt,

            Thank you for your reply.

            I do not have access to this indicator so I would not be able to guide you on specifics. However, I would recommend checking out our Strategy Builder 301 video as it goes over using indicators in a Strategy:

            Strategy Builder 301

            Once you understand how to access indicators through the Strategy Builder you can try using the indicator to just print its values for testing to see if it returns useful values.

            This forum post goes into great detail on how to use prints to help figure out what values are or are not being returned — this should get you going in the correct direction. You can even add these using the Strategy Builder.



            If you run into issues like we saw here, the above information will allow you to assess whether an indicator will be useful for you in a Strategy.

            Please let us know if we may be of further assistance to you.

            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Hi Kate:
              Thanks very much for the guidance. I have followed the videos and tried printing the plot values from the indicator. The following is the print statement I have come up with:

              Print(@"Bar Up: :" + AbleTrendTS1.BarUp[0].ToString() + @":Bar Down: :" + AbleTrendTS1.BarDn[0].ToString() + @":Buy Stop: :" + AbleTrendTS1.BuyStop[0].ToString() + @":Sell Stop: :" + AbleTrendTS1.SellStop[0].ToString() + @":Buy Signal: :" + AbleTrendTS1.Buy[0].ToString() + @":Sell Signal: :" + AbleTrendTS1.Sell[0].ToString() + @":Exit: :" + AbleTrendTS1.Exit[0].ToString() + ":" + Times[0][0].TimeOfDay.ToString() + @":EMA: :" + EMA1[0].ToString());

              However, it's printing zeros for all values of this indicator whereas for EMA it's printing the right value. For instance, see the attached screenshot and the printed value below for bar 02:30.

              Bar Up: :0:Bar Down: :0:Buy Stop: :0:Sell Stop: :0:Buy Signal: :0:Sell Signal: :0:Exit: :0:02:30:00:EMA: :1468.07042223726

              As the Data Box shows, there should have been values from the indicator. Can you think of what I might be doing wrong?

              Please find the script attached as well.

              Thanks again for your help.
              CV
              Attached Files

              Comment


                #8
                Hello chaitunt,

                Thank you for your reply.

                Unfortunately it does look as though you've set this up correctly in the Builder, so it appears this particular indicator does not expose the plot values - it's possible the indicator assigns values retroactively or simply doesn't expose them at all. We would not have a workaround for this as since it's a 3rd party indicator, we cannot access the code. It does appear that this particular indicator would not be able to be used in a strategy.

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment


                  #9
                  chaitunt,
                  Any chance you found any workable solution?
                  I'm in the exact same boat you are.

                  Thanks.

                  Comment


                    #10
                    chaitunt and/or NinjaTrader_Kate,
                    I am wondering the same thing at q40bomb. Is there any new information? I need to automate the identical signals.
                    A vendor who charges many thousands of dollars such as AbleTrend, then does not allow automation of their signals and indicators is not playing fair.

                    Comment


                      #11
                      Originally posted by culpepper View Post
                      chaitunt and/or NinjaTrader_Kate,
                      I am wondering the same thing at q40bomb. Is there any new information? I need to automate the identical signals.
                      A vendor who charges many thousands of dollars such as AbleTrend, then does not allow automation of their signals and indicators is not playing fair.
                      They are scared that once you figure out how to automate and backtest their signals you will find out that they are nowhere near as profitable as they claim to be. I have done that using the non-NT plugin version of AbleTrend which can export its signals into a file. The performance has been terrible for the last 3 month.

                      Comment


                        #12
                        Hello culpepper,

                        Thank you for your reply.

                        I am not aware of any updates that would allow you to use this in a strategy, no. You may want to reach out to the vendor directly.

                        Please let us know if we may be of further assistance to you.
                        Kate W.NinjaTrader Customer Service

                        Comment


                          #13
                          Hi,
                          Several thousand dollars for an indicator you can only for manual trading?
                          Did they suggest, you can use it with NinjaTrader for automated trading/backtesting/?
                          If Yes, I'd claim my money back.
                          NT-Roland

                          Comment


                            #14
                            Hello all:
                            I have been able to get the indicator to spit out plot values using an unspported method mentioned elsewhere on this site. I have also been able to read bar color using another unsupported method. For these methods to work, you need to add the indicator (or strategy using this indicator) to a chart. Once that's done you can access the plot values using the following code:

                            Code:
                            // NOTE: I used indicator labels to read values from 3 instances of the indicator
                            
                            double barType = 0;
                            int currentBarNumber = 0;
                            
                            if (ChartControl != null)
                            {
                            // PART A: Get color of the bar that just closed
                            this.Dispatcher.Invoke(() =>
                            {
                            NinjaTrader.Gui.Chart.Chart chart = Window.GetWindow(this.ChartControl) as NinjaTrader.Gui.Chart.Chart;
                            if (!chart.IsActive)
                            {
                            chart.Activate();
                            }
                            });
                            
                            currentBarNumber = CurrentBars[0];
                            
                            SharpDX.Direct2D1.Brush overriddenBarBrush = ChartControl.GetBarOverrideBrush(ChartBars, ChartBars.ToIndex);
                            if (overriddenBarBrush != null)
                            {
                            barColor = ((SharpDX.Direct2D1.SolidColorBrush)overriddenBarB rush).Color.ToString();
                            
                            if (barColor.Contains("Blue:1"))
                            barType = 1;
                            else if (barColor.Contains("Red:1"))
                            barType = -1;
                            else if (barColor.Contains("Green:1"))
                            barType = 0;
                            }
                            
                            if (overriddenBarBrush != null && RenderTarget != null)
                            overriddenBarBrush.Dispose();
                            
                            // PART B: Get plot values
                            foreach (NinjaTrader.Gui.NinjaScript.IndicatorRenderBase indicator in ChartControl.Indicators)
                            {
                            if (indicator.GetType() == typeof(AbleTrendTS))
                            {
                            AbleTrendTS at = indicator as AbleTrendTS;
                            if (at != null && ((at.Name == "ATTS1" && BarsInProgress == 0) || (at.Name == "ATTS2" && BarsInProgress == 1) || (at.Name == "ATTS3" && BarsInProgress == 2)))
                            {
                            if (BarsInProgress == 0)
                            currentBarNumber = CurrentBars[0];
                            else if (BarsInProgress == 1)
                            currentBarNumber = CurrentBars[1];
                            else if (BarsInProgress == 2)
                            currentBarNumber = CurrentBars[2];
                            
                            for (int i = 0; i < at.Values.Length; i++)
                            {
                            if (at.Values[i].IsValidDataPointAt(currentBarNumber))
                            {
                            double plotValue = at.Values[i].GetValueAt(currentBarNumber);
                            Print(string.Format("plotName: {0}, plotValue: {1}, barType: {2}", plotName, plotValue, barType));
                            }
                            }
                            }
                            }
                            }
                            }
                            Based on my actual experience with this indicator so far, I feel obligated to caution you that reading plot values programmatically is only the starting point. I don't want to go off the subject too much and turn this thread into a discussion about a proprietary indicator but I'll just say the following as there seem to be more folks trying to do this:

                            1. Since this indicator requires a chart you cannot use it in Strategy Builder or Strategy Analyzer. Meaning, you cannot backtest any strategy using this indicator in Strategy Analyzer.
                            2. The above method to read bar color will not work if the chart is not active. Meaning, the chart window must be visible on the screen. It doesn't need to be in focus though.
                            3. Most importantly, this indicator was not developed with automation in mind. It may not be an issue if you intend to use only a few instances on a couple of instruments. In my case though, I ran into corrupt memory issues that would just shutdown NT.
                            4. More important than this or any other indicator are a trader's choice of instruments, time frame to trade and risk management.

                            Good luck.

                            Comment


                              #15
                              Originally posted by mercforhire View Post

                              They are scared that once you figure out how to automate and backtest their signals you will find out that they are nowhere near as profitable as they claim to be. I have done that using the non-NT plugin version of AbleTrend which can export its signals into a file. The performance has been terrible for the last 3 month.
                              Hi mercforhire,
                              Thanks for your post. Your results are intriguing. Sadly, NT would frown on using this forum for a discussion. My goal is likely similar to thread starter "chaitunt", I simply want to enable the AbleTrend plots in a strategy then walk-forward a range of intraday ideas to come up with a couple of viable strategies to add to the arsenal. I wonder how many round turns were in your performance test.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by philmg, Today, 12:55 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post philmg
                              by philmg
                               
                              Started by Russ Moreland, Today, 12:54 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Russ Moreland  
                              Started by f.saeidi, Today, 12:14 PM
                              2 responses
                              6 views
                              0 likes
                              Last Post f.saeidi  
                              Started by TradeForge, 04-19-2024, 02:09 AM
                              2 responses
                              30 views
                              0 likes
                              Last Post TradeForge  
                              Started by aprilfool, 12-03-2022, 03:01 PM
                              3 responses
                              327 views
                              0 likes
                              Last Post NinjaTrader_Adrian  
                              Working...
                              X