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

Order Type

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

    Order Type

    Hi,

    I am new so I need help :

    How can I change the order type to :
    1. Last price.
    2. For Long, Join Bid intead of Market order
    3. For Sell, Join Offer instead of Market order

    OrderType.Market for Market order

    Thanks in advance

    #2
    Hello futpro,

    There are two different order systems. Please review the following links on the managed and unmanaged systems.

    Managed Orders
    Unmanaged Orders

    If you're just getting started with NinjaScript, take a look at the managed orders section for some examples on formatting. Another good way to learn the syntax is using the strategy wizard condition builder. You can select parameters for orders in a point and click interface, and then view the resulting code.

    Let us know if you have any additional questions.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      I just want to change the Ordertype to join bid/offer or last traded price. Here is part of the code :

      AtmStrategyCreate(Action.SellShort, OrderType.Market,
      0, 0, TimeInForce.Day, atmOrderIdShort, ATMStrategy, atmIdShort);

      Thanks

      Comment


        #4
        You would need to decide at which price to submit the order, for the current bid you can use GetCurrentBid() and for the last price Close[0] on CalculateOnBarClose = false.

        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks Bertrand for the tip.

          Any easy way of copying the Strategy and then making slight changes to make new ones instead of cutting and pasting existing Strategy.

          Comment


            #6
            Please right click in the code and select 'Save as' to save under a new name for creating a 'modded' version.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thanks Bertrand. Have a wonderful day.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by trilliantrader, Today, 03:01 PM
              0 responses
              2 views
              0 likes
              Last Post trilliantrader  
              Started by pechtri, 06-22-2023, 02:31 AM
              9 responses
              122 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by frankthearm, 04-18-2024, 09:08 AM
              16 responses
              67 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by habeebft, Today, 01:18 PM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by benmarkal, Today, 12:52 PM
              2 responses
              19 views
              0 likes
              Last Post benmarkal  
              Working...
              X