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

Seeking guidance on adding buttons to place orders above/below indicator values

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

    Seeking guidance on adding buttons to place orders above/below indicator values

    Hello,

    I am an experienced C# programmer but new to ninjatrader. I want to add a long and a short button to my ninjatrader. When pressed the button places a buy stop above or below an indicator value. For example, I want it to place a buy stop short order below the most recent zigzag low. Could you give me high-level guidance on how to achieve this? My initial thoughts based on my knowledge of ninjatrader is to create an indicator with two buttons and that also has an instance of the zig zag indicator. When I press the short button, it would loop through the instance of the zig-zag indicator backwards from the current bar and find the most recent zig-zag low and then use that value to place the order? Is that the recommended approach?

    Thank you.
    Last edited by newton1; 10-16-2021, 10:23 AM.

    #2
    take a look at this, hope it helps

    AddOn Development Basics
    The NinjaScript AddOn framework provides functionality reaching across the NinjaTrader platform while granting access to certain core methods and properties not contained within the NinjaScript namespace. In addition to creating your own independent window or modifying the user interface and functionality of existing NinjaTrader windows (charts, etc.), AddOns can also subscribe to live market data, access account information, and more.

    https://ninjatrader.com/support/help...t_overview.htm

    Comment


      #3
      Hello newton1,

      Welcome to the NinjaTrader forums!

      A great example of adding a button to a chart using an indicator, and placing an order from the button using the Addon approach, is named ChartOrderButtonsIndicatorExample and is linked below.
      https://ninjatrader.com/support/foru...18#post1126818

      And a link to the help guide on the ZigZag indicator.
      https://ninjatrader.com/support/help...nt8/zigzag.htm

      I am also including a link to a forum post with helpful information about getting started with NinjaScript.
      https://ninjatrader.com/support/foru...040#post786040

      And on using prints and TraceOrders to understand behavior.
      https://ninjatrader.com/support/foru...121#post791121
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Learner Trader, Today, 01:49 AM
      0 responses
      1 view
      0 likes
      Last Post Learner Trader  
      Started by alcorr247, Yesterday, 09:53 PM
      1 response
      37 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by traderslab, Yesterday, 10:27 PM
      0 responses
      35 views
      0 likes
      Last Post traderslab  
      Started by jjanguda, Yesterday, 09:40 PM
      1 response
      41 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by jeronymite, Yesterday, 07:15 PM
      0 responses
      60 views
      0 likes
      Last Post jeronymite  
      Working...
      X