Announcement

Collapse
No announcement yet.

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.

    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.

        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?

            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.

                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.

                    Comment


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

                      Comment


                        #12
                        Glad to hear that.

                        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.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                            0 responses
                            571 views
                            0 likes
                            Last Post Geovanny Suaza  
                            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                            0 responses
                            331 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by Mindset, 02-09-2026, 11:44 AM
                            0 responses
                            101 views
                            0 likes
                            Last Post Mindset
                            by Mindset
                             
                            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                            0 responses
                            549 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by RFrosty, 01-28-2026, 06:49 PM
                            0 responses
                            549 views
                            1 like
                            Last Post RFrosty
                            by RFrosty
                             
                            Working...
                            X