Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using indicator to send orders

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

    Using indicator to send orders

    Hi,

    I created an indicator with menu and sub menu.
    I'd like to send orders clicking on submenu option, but on bar update void, it doesn't seemsto be avoid (EnterLong is not accepted) Do i have to use this indicator with global variable and create a strategy using it, or is there a way to send orders with an indicator ?

    Other question please, is it possible to hide sub window indicator (not with menu option but with code) on chart like on my screenshot ?

    Thanks for your answers.
    Click image for larger version  Name:	Capture.PNG Views:	0 Size:	154.8 KB ID:	1127076
    Last edited by fredericlebre; 11-11-2020, 03:34 AM.

    #2
    you need this
    https://ninjatrader.com/support/help...ount_class.htm

    Or you can hook the chart trader buttons and programmatically click them etc


    Last edited by MicroTrends; 11-11-2020, 04:58 AM.
    MicroTrends
    NinjaTrader Ecosystem Vendor - micro-trends.co.uk

    Comment


      #3
      thanks a lot

      Comment


        #4
        How to declare a variable in an indicator and use it on a strategy ?

        Comment


          #5
          Hello fredericlebre,

          Thank you for your post.

          Strategies are able to use variables that are exposed by an indicator. If you would like to have a variable accessible from an indicator, you will need to make a public variable, like the properties in the SampleBoolSeries example script below, and access the private variable from there.

          Please see the reference sample source code for the SampleBoolSeries indicator which demonstrates this for the Series named BullIndication and BearIndication. These variables are declared publicly alongside the input properties except with [Browsable(false)] and [XmlIgnore] to prevent the public variable from listing as a parameter.

          SampleBoolSeries - https://ninjatrader.com/support/forum/forum/ninjascript-educational-resources/reference-samples/5161-indicator-exposing-indicator-values-that-are-not-plots?t=4991

          Let us know if we may further assist.
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment

          Latest Posts

          Collapse

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