Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Indicator value.Set in another Indicator

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

    Using Indicator value.Set in another Indicator

    Hello,

    I have create a Indikator- with Name "TD15M" to look at the Trend in a time of 15min. So I set this value in (If Statements).

    If long
    {
    Value.Set(1)
    }
    else
    Value.Set(-1)


    In the next, I would like to use the ValueSets 1 / -1 from "TD15M" in a new Indicator
    to programming a another If Statement.

    for example:

    If (Close[0] > Close[1] && TD15M == 1)
    {
    do this....
    }
    else
    do this....

    Is that possible an how can I declare my TD15M-Value?

    For reply many thanks :-)

    #2
    Originally posted by chartvisor View Post
    Hello,

    I have create a Indikator- with Name "TD15M" to look at the Trend in a time of 15min. So I set this value in (If Statements).

    If long
    {
    Value.Set(1)
    }
    else
    Value.Set(-1)


    In the next, I would like to use the ValueSets 1 / -1 from "TD15M" in a new Indicator
    to programming a another If Statement.

    for example:

    If (Close[0] > Close[1] && TD15M == 1)
    {
    do this....
    }
    else
    do this....

    Is that possible an how can I declare my TD15M-Value?

    For reply many thanks :-)
    If (Close[0] > Close[1] && TD15M.Plot0[0] == 1)...

    Comment


      #3
      Hello chartvisor,

      Thank you for your post and thank you to Koganam for answering this item.

      You can find examples on calling different indicator methods at the following link: http://www.ninjatrader.com/support/h..._indicator.htm

      Comment


        #4
        Hello koganam,

        thank you for your reply.

        I tryed this but it comes the Errormessage CS0119 Methode not possible?

        Comment


          #5
          Originally posted by chartvisor View Post
          Hello koganam,

          thank you for your reply.

          I tryed this but it comes the Errormessage CS0119 Methode not possible?
          That is an if statement, not a method. Your issue lies elsewhere.

          Comment


            #6
            Hello chartvisor,

            Please try if (Close[0] > Close[1] && TD15M().Plot0[0] == 1).

            Comment


              #7
              Hello PatrickH,

              thank you for your reply,

              I have tryed it too, but it not running. How can I declare my own Indicator "TD15M"
              and how can I ask the values? Must the Indicator declare as Variables?

              For exampel:

              if
              (
              Close[0] < Open[0] && TD15M.Plot0[0] == 1
              )
              {
              Value.Set(1);
              }
              else
              Value.Set(0);

              Comment


                #8
                Hello chartvisor,

                Thank you for your response.

                Is TD15M an indicator that has already been created? Can you attach the .cs file for TD15M to your response? You will find the indicator in the following directory on your PC: (My) Documents\NinjaTrader 7\bin\Custom\Indicator.

                Comment


                  #9
                  I tryed it - then Errormessage CS1501 not arguments?

                  Comment


                    #10
                    Yes the Indicator is in this file "TD15M.cs"

                    Comment


                      #11
                      Hello chartvisor,

                      Thank you for your response.

                      You are missing the needed overload for the method, these would be the parameters you set as the user defined parameters in the TD15M.

                      Comment


                        #12
                        I don´t understand ? What can I do?

                        Comment


                          #13
                          Hello chartvisor,

                          Thank you for your response.

                          Can you attach the .cs file for TD15M to your response? You will find the indicator in the following directory on your PC: (My) Documents\NinjaTrader 7\bin\Custom\Indicator.

                          Comment


                            #14
                            Yes the indicator is in this directory.

                            Comment


                              #15
                              Hello chartvisor,

                              Thank you for that confirmation.

                              Can you attach that file to your response in this Support Forum thread? This way I can test and provide an example of using the correct overload for this indicator.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              574 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              333 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
                              553 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              551 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X