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

As to increase my position with orders in prices entry different

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

    As to increase my position with orders in prices entry different

    how can I increase my position with a series of orders to different prices of entry the one from the other? I make sense of me, I have a condition of entry that if repeated it increases of a contract my position with an order limit, however I would want the price of this new entry to be different from the price of the leaning orders inserted in precedence.

    #2
    Hello,

    Thank you for your forum post.

    Its hard for me to understand what you are asking. Can you please clarify further what you are specifically trying to do in as simple terms as you can find since I don't understand what it is your trying to do.

    Comment


      #3
      Example: my condition tells me of Long to enter with a contract to price limit of 6100. The order is subsequently sent the condition it tells me to still enter Long with the same price limit of 6100. To this point I would have inserted two orders to llo same price Limit. I don't desire this situation to happen. I don't want double orders to the same price.Besides I would want that there were at the most three orders in prices position different. How can I operate?

      Comment


        #4
        Hello,

        If you are submitting the limit orders using EnterLongLimit following the order entry rules a EnterLongLimit will be cancelled if you stop calling it when liveUntilCancelled is set to false , therefor you would need to continue to call the EnterLongLimit until your order was filled or you wanted the order cancelled and not filled. This would not just continually submit limit orders opon each bar update. Please see the following reference sample on how this is done:



        EnterLongLimit()


        If you are looking to submit 3 orders to scale in only you can use the entriesPerDirection setting when you first start the strategy to limit the strategy to only opening 3 long positions and that will limit you to only 3 positions.

        Also see this reference guide that may help you on scaling out of a position:


        Let me know if I can be of further assistance.

        Comment


          #5
          Persistence order limit

          I have inserted these instructions in Initialize

          CalculateOnBarClose = false;
          Add(PeriodType.Tick,200); //1
          Add(PeriodType.Tick,50); //2
          Add(PeriodType.Minute,1); //3

          to which I have made to follow an order with these formulations.

          EnterLongLimit(3,true,1,entryprice, "Buy_1" );

          my question is :the inserted order is in pending and he/she remains you inserted up to the beginning of the following bar to 1 minute and automatically it is cancelled or it is nececessario to directly intervene with cancelorder.
          What I desire is that the order limit is active up to that to the closing of the bar to 1 minute. How can I proceed? Thanks

          Comment


            #6
            onurbbruno, since you've set 'liveUntilCancelled' to 'true' you would need to CancelOrder it when not needed anymore, as it would then not expire at the next OnBarUpdate() call.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thanks for the answer. I have provided to implement some linefeeds of code to have the control of the order and his/her persistence up to the cancellation to the desired conditions.
              if ((EntryOrder1Buy != null) && ( OkEntry1Buy ==false ) && (CurrentBars[3] >= barNumber1Buy + persistenceabuy))
              CancelOrder(EntryOrder1Buy);

              In this case I have decided to cancel the order after a number of equal bars "persistenceabuy" from the entrance of the order in the bar I number barNumber1Buy. The everything is reported to a time different frame from that of the graph of the title, particularly it is reported to the timeframe pointed out by the education. For this motive I have used the education CurrentBars [3]. I hope to have been clear to be able to help other people with my same problem.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by funk10101, Today, 08:14 AM
              3 responses
              5 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by frankthearm, Today, 09:08 AM
              0 responses
              1 view
              0 likes
              Last Post frankthearm  
              Started by samish18, Yesterday, 08:57 AM
              11 responses
              28 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by yertle, Today, 08:38 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by love2code2trade, Yesterday, 01:45 PM
              3 responses
              22 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Working...
              X