Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to check for "TRUE" condition (for an indicator)?

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

    How to check for "TRUE" condition (for an indicator)?

    I have a RSi divergence indicator I would like to incorporate in my strategy/Alert. How do I check if RSI divergence is"True''?

    For example:
    If there is RSI Divergence (i.e. Divergence = True) >> Do the following... and Alert.

    See attached screenshot for the options available.

    Some trading platform i have used in the past like ThinkorSwim have the option to check for True or False condition for an indicator.

    Assuming, I can check for TRUE conditions. Is it possible to check for TRUE condition within the last X bars (example10 bars)?
    Attached Files
    Last edited by cryfgg; 09-07-2021, 08:08 PM.

    #2
    Misc True
    Attached Files

    Comment


      #3
      Hello cryfgg,

      Thanks for your post.

      As this is a third party script, I cannot say what exactly it outputs. You would want to understand the output of the indicator to create logic with it. Checking a boolean value from an Indicator output as JMont1 mentions would be irregular, so I may suggest the following:

      Alerts and strategies can read plots from indicators, and you can test reading the output of an indicator by creating a print with that indicator using the Strategy Builder.

      I.E. You can create a strategy where it only adds an action for Misc > Print that prints the value of the indicator as you have it set up. You can then apply the strategy to a chart with the NinjaScript Output window open, and you can see the values that come out of the indicator to see how you can build logic with it in an Alert or Strategy.

      If you do not see meaningful values, you may wish to consult the developer of that indicator to ask if it can be used with Alerts and Strategies and to ask for an example condition.

      For additional reference, I have included our Conditions Examples from the Help Guide:



      We look forward to assisting.
      Last edited by NinjaTrader_Jim; 09-08-2021, 06:40 AM.

      Comment


        #4
        Originally posted by NinjaTrader_Jim View Post
        Hello cryfgg,

        Thanks for your post.

        As this is a third party script, I cannot say what exactly it outputs. You would want to understand the output of the indicator to create logic with it. Checking a boolean value from an Indicator output as JMont1 mentions would be irregular, so I may suggest the following:

        Alerts and strategies can read plots from indicators, and you can test reading the output of an indicator by creating a print with that indicator using the Strategy Builder.

        I.E. You can create a strategy where it only adds an action for Misc > Print that prints the value of the indicator as you have it set up. You can then apply the strategy to a chart with the NinjaScript Output window open, and you can see the values that come out of the indicator to see how you can build logic with it in an Alert or Strategy.

        If you do not see meaningful values, you may wish to consult the developer of that indicator to ask if it can be used with Alerts and Strategies and to ask for an example condition.

        For additional reference, I have included our Conditions Examples from the Help Guide:



        We look forward to assisting.


        I can't find the option to print the indicator output (Misc). See screenshot below. "JMont1" suggestion above didn't work (you were right about that).

        Attached Files

        Comment


          #5
          Hello cryfgg,

          You are looking at the Condition Builder. To make a print, please create a new Action, and then navigate to Misc > Print.

          Comment


            #6
            Originally posted by NinjaTrader_Jim View Post
            Hello cryfgg,

            You are looking at the Condition Builder. To make a print, please create a new Action, and then navigate to Misc > Print.
            How do I use Print() to print the value of the indicator? See my screenshots.
            Attached Files

            Comment


              #7
              Hello cryfgg,

              Similar to setting the Y value in Draw.ArrowDown, you would click the set button within the Message Text Box of the Print. From there we will be met with a String Builder, which we can click the set button within a string to select values to be displayed in that string.
              Attached Files

              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
              330 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
              548 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