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

Multi pending orders

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

    Multi pending orders

    Hello I want to develop a sort of antimartingale system.
    This is the ATM I want to create:

    When I open a trade (For example a LONG trade) I want to open istantly 3 pendig buy stop order each one 16 tick above the other. To be clear lets assume that I open a trade at price of 1000.00. I want a buy order at 1004.00 one at 1008.00 and one at 1012.00 (assuming that 4 poits are 16 ticks like SP).

    When I open my trade I want a stop loss of 16 ticks (in the example above wold be at 996.00) but everytime a buy order is filled I want my stop loss to move a break even. In this case the break even is the average price: if I open a 1000 and 1004 is filled I want my stop loss to move from 996 to 1002, when 1008 is filled the stop loss should move at 1004 and so on.

    Of corse the same would be for a SHORT trade.

    Can you please suggest me some references or code in order to start?

    #2
    I though that Doesn't matter if they are pending I can just add position once I reache the price calculated and move the stop loss

    Comment


      #3
      Hello briesanji,

      This is posted in the NinjaScript Strategy Development section of the forums.

      To confirm you are trying to write C# code to automate this and use AtmStrategyCreate() to trigger an Atm template with the automated entries?

      Or are you trying to setup an Atm in a trading window to trade manually?
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        I would like to write the code in c# but the first trade would be place manually. The problem is that I don't know where to start.. I know c# language but not applied to Ninjatrader

        Comment


          #5
          Hello briesanji,

          Below is a link to a forum post with helpful information about getting started with C# and NinjaScript.


          A manual order would need to be found through the Addon approach directly from an account.

          There is not a supported method to add an ATM template to a position from NinjaScript after the position has been opened.

          You could have the addon submit the order directly, or you can submit exit orders and control these with logic.
          Hello! How can we apply an ATM Strategy to an existing position from an Addon? Also how can we set a StopLoss for that same position? We have an addon that is submitting orders and managing them via an Addon with a custom user window with specific settings not allowed in a Strategy. We need to be able to do the "apply
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by nicthe, Today, 07:57 PM
          0 responses
          1 view
          0 likes
          Last Post nicthe
          by nicthe
           
          Started by heiheilau2000, 06-11-2024, 08:32 AM
          6 responses
          25 views
          0 likes
          Last Post heiheilau2000  
          Started by franjcy, Today, 01:23 PM
          0 responses
          9 views
          0 likes
          Last Post franjcy
          by franjcy
           
          Started by tony_28217, Today, 12:55 PM
          0 responses
          6 views
          0 likes
          Last Post tony_28217  
          Started by thumper57, Today, 12:12 PM
          0 responses
          16 views
          0 likes
          Last Post thumper57  
          Working...
          X