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

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 f.saeidi, Today, 08:01 PM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by Rapine Heihei, Today, 07:51 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post Rapine Heihei  
                              Started by frslvr, 04-11-2024, 07:26 AM
                              5 responses
                              96 views
                              1 like
                              Last Post caryc123  
                              Started by algospoke, 04-17-2024, 06:40 PM
                              6 responses
                              49 views
                              0 likes
                              Last Post algospoke  
                              Started by arvidvanstaey, Today, 02:19 PM
                              4 responses
                              11 views
                              0 likes
                              Last Post arvidvanstaey  
                              Working...
                              X