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

What value returns the indicator?

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

    What value returns the indicator?

    I have an indicator and I would like to figure out what type of value this indicator returns.
    If I look at the code I dont know, because it is very complex. But I would like to use this indicator in a strategy. How can I do this?

    Indicator is in the attach.
    Attached Files

    #2
    Hi Ironman9973, looks like it exposes two plots / DataSeries for access in your conditions, UpTrend and DownTrend.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      And what type of value is that? Bool , double? Or how can I use it?

      Thank you.

      Comment


        #4
        Ironman9973, it would be a DataSeries returning double values, just like any other plots.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I tried to use the indicator in a strategy. But it did not worked. I am getting always an error message. And I dont know why. I cannot use the Uptrend or Downtrend like a double value.

          Thanks

          Comment


            #6
            What exact error message are you getting, would you mind posting a screenshot?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Here is the screenshot.
              Attached Files

              Comment


                #8
                Please try adding using TSSuperTrend.Utility; to the top 'using' section in the script.

                And then just call the enums directly in the overload, so use MovingAverageType.SMA / SuperTrendMode.ATR

                Then I believe it should compile for you.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  I added TSSuperTrend into the utilitys section. But I dont know what you mean with call the
                  enums directly in the overload.

                  Thanks

                  Comment


                    #10
                    Your enum parameter values in the TSSuperTrend method call is not correct, please try changing them to what I've outlined below.

                    Something like TSSuperTrend(14, MovingAverageType.SMA, 2.618, 14, SuperTrendMode.ATR) should compile then.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Thank you very much. Now it is working.

                      Comment


                        #12
                        Glad to hear that.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          I have one more question. Is there a possibility to convert Uptrend or Downtrend to bool?
                          I want if Uptrend is true than do something and and if Downtrend is true than do something.
                          Is this possibel?

                          Thank you.

                          Comment


                            #14
                            That would be possible to create and expose via custom coding as well, the indicator itself I believe has an internal Trend series already, however you might want to look into this study shared on BMT for NT7 - http://www.bigmiketrading.com/downlo...-download.html

                            It directly offers a even more versatile SuperTrend exposing the trend state directly for script access via a bool series.
                            BertrandNinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by andrewtrades, Today, 04:57 PM
                            1 response
                            6 views
                            0 likes
                            Last Post NinjaTrader_Manfred  
                            Started by chbruno, Today, 04:10 PM
                            0 responses
                            5 views
                            0 likes
                            Last Post chbruno
                            by chbruno
                             
                            Started by josh18955, 03-25-2023, 11:16 AM
                            6 responses
                            436 views
                            0 likes
                            Last Post Delerium  
                            Started by FAQtrader, Today, 03:35 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post FAQtrader  
                            Started by rocketman7, Today, 09:41 AM
                            5 responses
                            19 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Working...
                            X