• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Newbie questions, charting gaps, oco orders???

  • Filter
  • Time
  • Show
Clear All
new posts

    Newbie questions, charting gaps, oco orders???

    Hi everyone,
    I'm primarily a stock trader and am currently making a switch to futures. I'm currently using ninjatrader as a simulator until I feel comfortable with it. There are a few problems that I'm having.

    First of all, when it comes to charting I'm used to being able to zoom out while using 1 minute and 5 minute charts. On ninjatrader the only thing I can do is scroll back and forth, but I don't get the birds eye view of the chart unless I use a different time frame like 15min or 30min candlesticks. How do I zoom out on a 1 minute chart to get a birds eye view of price action?

    Secondly, I notice when I go to daily bars on the ES that there are large gaps in prices from open to close everyday. I don't understand this because the ES only stops trading for very brief periods of time. The only time gaps appear is from the weekend. Why is it showing incorrect prices?

    My last question has to do with OCO orders. Ninjatrader is totally different from other stock trading and futures demo programs I've used. Basically it seems like the term ATM is used instead and you have to place OCO orders before you take your initial position. How do I enter an OCO order if I don't enter an ATM order before I get into a position?

    Any help would be appreciated.


    Hello schulzey,

    1. You can compress the time scale of a chart to show more data by left mouse clicking on the time scale and dragging your cursor to compress or expand the time scaling of the chart.

    2. Daily bars will use a predefined session template provided by the data provider. Please use a 1440 minute interval and set the session template to the time frame you are wanting to see data for. You can view/edit/create session templates in the Session Manager window. Below is a link to the Session Manager section of our help guide.

    3. To use the OCO feature you will need to right click on the order entry window and select OCO Orders. You should then see a green box on the order entry window that says OC or OCO. Once you see this box place your orders. Then right click on the order entry window and select OCO Order. You only need to have OCO enabled when placing the orders. You will want to disable OCO Orders after placing the orders otherwise the feature may not work as expected.
    Christopher S.NinjaTrader Customer Service


      thanks for the reply! That took care of those problems.

      I just have a few more questions and I should be off to the races. I'm using basic entry or the chart trader to enter my orders but I don't understand the control panel. Why is there a box that says "OCO: " with a blank that you can fill in? All the rest of the open boxes make sense for limit prices, stop prices, tif, etc., but a single box that says "OCO" doesn't make sense to me. You need two orders for an OCO.

      I was also wondering if there is anyway to clear out past orders that have been filled or canceled from the control panel? That way it's easier to see my most recent trade activity.

      And the last question that I should be asking for a while. The chart trader gets really cluttered up with all of the markings of my previous trades. How do I delete the previous buy and sell points off of the chart so I don't get confused with my current trades?

      Again, thanks for the help!!
      Last edited by schulzey; 07-03-2012, 01:27 AM.


        Hello schulzey,

        The OCO box allows you to setup an OCO group ID. For example, if you enter a value of 1, all subsequent orders will be part of the same OCO group.

        Yes, please right click in the grid of the Control Center-->Orders-tab and select 'Filter Only Active Orders'.

        Please follow the instructions below to disable the plotting of trade executions.

        •Right click in your chart and select the menu "Data Series..."
        •Find the "Plot executions" parameter for each data series and change the value to "DoNotPlot"
        •Press the "OK" button

        See here for more information on working with Data Series > How to edit Data Series parameters:
        JasonNinjaTrader Customer Service


          I don't understand what you mean by labeling oco order groups. Is there a video that explains this?

          Also, I still don't understand how I input an OCO order that isn't an ATM strategy. I'm looking to sell at a limit above a certain price and buy at a limit below a certain price. But then I want my ATM strategy (OCO) attached to either one of the orders that fills.

          I right click on the screen to get the green OC tag next to the order price, but then how do I link two orders to cancel eachother? Say the last price is at 1360.00 I want to sell at a limit of 1365.00 with an ATM strategy attached, or I want to buy at a limit of 1355.00 with an ATM strategy attached. But I want that first buy or sell to be an OCO order to buy at 1355 or sell at 1365. That way I don't have to manually keep entering in buy or sells in case price moves fast.

          I'm really confused by this. Everything else makes sense to me except these things.


            I'd also like to know how to add an OCO order to a position I have for a profit target and stop loss in case I forget to add my ATM strategy. I don't understand how you add this.

            Every other program I've ever used is very easy to enter OCO orders. I don't understand why Ninjatrader makes this so complicated.


              Hello schulzey,

              OCO orders are linked by an OCO ID. When placing orders from the Control Panel, you will need to manually enter in the OCO ID to link orders by One Cancles Other.

              OCO is an order property that groups orders together by a common user defined id. If one order in the group is either filled, cancelled or rejected, all orders in the group with the same OCO id will be cancelled.

              When using the OCO feature, either to bracket the market or manually enter a stop loss and profit target you will need to right click on the order entry window ( Chart Trader, Basic Entry, SuperDOM), and select OCO Order. You will see the green OC or OCO box to confirm the feature is enabled. You will then place your orders. Either you buy and sell entry orders or your stop loss and profit target orders. After placing the orders, right click on the order entry window and select OCO Order. The green box should now disappear.

              You will only want to have OCO Orders enabled when placing the orders. By leaving the feature enabled after placing the orders, all other order placed will have the same OCO ID and you can not expect the feature to work correctly.
              Christopher S.NinjaTrader Customer Service


                Okay, great. I have that all figured out now.

                This should be my last question for a long time. Is there anyway to program an "if, then" order? My last brokerage (optionshouse) had this type of order and it was very beneficial.

                For instance, I buy ES at 1300 with a hard sell stop at 1290 and a price target of 1320. If price goes down to 1295, then I want to lower my limit order (price target) to 1310.

                Thanks a bunch! You are helpful!



                  It would be possible to program these types of strategies using a fully automted NinjaScript strategy.

                  You can also use the Advanced options in your ATM Strategy which includes Target Chase:

                  MatthewNinjaTrader Product Management


                    Okay, I'll figure out the chase thing.

                    By the way, when I try to enter a simultaneous sell order above price and buy order below price both with atm strategies, it says:

                    "You can't submit an exit order to a strategy until any of its entry orders has been filled."

                    So I can only do one OCO order. I want an OCO order and then a profit target and stop loss attached to either filled order.



                      You will want to re-select the active ATM Strategy from the ATM Strategy Control List before submitting the second order.

                      Make sure it does not say "* Active ATM Strategy - " when submitting.
                      MatthewNinjaTrader Product Management


                        First, I just want to say thank you for replying so fast. You've been very helpful learning the Ninjatrader platform.

                        So far I've figured everything out that I need to except the auto chase. I read the help discussion but I still can't figure out how to get it to do what I want. If there is any way you could help me out and walk me through what I need to do to set this up I'd appreciate it.

                        Last price is 1350 on the ES. I buy at 1350 with a sell limit (profit target) at 1380 and a sell stop at 1340. I want my profit target to move down when last price reaches 1345. If last price reaches 1345 then I want my sell limit (profit target) to go down to 1370 (or possibly lower). How would I set this up with AutoChase?


                          You would not have this level of control on AutoChase. AutoChase is only going to give you the option to change a limit order as the market moves away from it. You cannot specify at exactly what price this occurs.
                          MatthewNinjaTrader Product Management


                            Well then I guess I would have to look into programming this strategy. I haven't programmed strategies on a trading platform before. Where should I start trying to figure out how to do this?


                              If you have never created a strategy before, I would recommend starting with our point and click interface Strategy Wizard.

                              Please see our Help Guide articles on How to use the Strategy Wizard as well as NinjaScript Strategies. More information on these subjects can be found below:
                              Click here for more information on Developing Strategies with the Strategy Wizard
                              Click here for a Tutorial on Developing Strategies

                              I'm also proving a link to a recently recorded 'Automated Strategy Development Webinar' video for you to view at your own convenience: http://youtube/fVFqw5W8uGI

                              There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under Tools--> Edit NinjaScript--> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

                              We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:

                              Click here to see our NinjaScript Reference Samples
                              Click here to see our NinjaScript Tips

                              These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

                              Lastly, you can attend one of our live Automated Strategy Development Webinars to help you get up to speed on developing strategies:


                              If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
                              Click here for a list of certified NinjaScript Consultants
                              MatthewNinjaTrader Product Management


                              Latest Posts


                              Topics Statistics Last Post
                              Started by rameses, Today, 02:43 AM
                              1 response
                              Last Post NinjaTrader_Marco  
                              Started by pol133, Today, 12:39 AM
                              1 response
                              Last Post NinjaTrader_ChrisSch  
                              Started by GKRuubster, Yesterday, 06:22 AM
                              1 response
                              Last Post NinjaTrader_Marco  
                              Started by Bsmckm, 07-04-2020, 02:02 PM
                              1 response
                              Last Post NinjaTrader_Marco  
                              Started by pol133, Today, 02:35 AM
                              0 responses
                              Last Post pol133
                              by pol133