Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Scalability without ATM

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

    #31
    i just did a small change in the strategy, attaching the new cs file.
    pls refer to the issues in the previous 2 posts.
    The OrderState is stuck at PendingChange in Simulation.
    Check at 3.35 PM
    Or, if the first order gets filled it doesn't follow up with the remaining quantity at all.
    Check at 4.10 PM
    Log file attached.
    Attached Files
    Last edited by piyushc; 03-03-2014, 04:48 AM.

    Comment


      #32
      Can't see Cal online, Can Patrick take it up?
      Thanks

      Comment


        #33
        Hello piyushc,

        Thank you for your response.

        I would like to bring this back a bit. Would it be possible to get the basic idea from you on what you are trying to do here? I feel there is a much easier method to do what you are trying.

        Comment


          #34
          My intention with this code is to:
          1. Scale Up the Quantity to be Traded
          2. By keeping Slippage under control. That is to trade within a defined % boundary of the Last Traded Price just before the Signal generated.

          Please let me know if i need to elaborate any further.

          Comment


            #35
            Hello piyushc,

            Thank you for your response.

            In your strategy under the OnOrderUpdate() why are we checking if the order filled? Would we not need to check if the order state was partially filled? And why do we submit multiple orders for the same quantity over and over again in a for loop? Would we not just need to adjust the currently existing order that has not fully filled to the new price level with the remaining quantity assigned?

            I look forward to your response.

            Comment


              #36
              The idea was not to load/expose the quantity entirely at one go & trade it in 1/n fashion.
              Before i take up your suggestion, can i please understand why in the current coding the order gets stuck at PendingChange, why wasn't it changing??

              By doing what you're suggesting, do you think it will not get stuck anywhere?
              In a normal scenario, the Order States, if your suggestion is followed, would be:
              1. Filled
              2. PartFilled
              3. Working
              4. PendingChange
              That's usually, right?

              Comment


                #37
                Hi Patrick

                Do you think i should elaborate some more?
                See this was my original thought, i'm certainly looking for any fresh ideas.

                Thanks for rendering help.

                Comment


                  #38
                  Hello piyushc,

                  Thank you for your explanation and patience.

                  I believe it is getting stuck due to the amount of times it is adjusted and submitted. I would think to enter each order as one and create a custom counter to ensure we reach the desired amount.

                  Comment


                    #39
                    So you suggest the entire quantity to be fired at one go & then as it goes PartFilled, we then ChangeOrder.
                    Even in that case, the number of times it will be modified & submitted would perhaps be same.
                    So how does that really changes things?
                    My questions(pls answer all):
                    Q.1. Back to the current coding, how to get out of the situation if the Order is stuck at PendingChange?

                    Q.2. In other case, if the first order got Filled, it did not follow up with the remaining quantity or orders to be followed up after first.
                    Refer post #31 for attachments.
                    i hope you understand that the your suggestion is based on changing the logic while this current coding is not showing any errors at all & since it is more in line with how i would like to do the order management but if there is any real workable error, then i'm more than keen to shift to any other idea quickly enough.

                    Q.3. Should i ignore the following...?
                    i have read it in the Help Section but i still need to ask you whether EntriesPerDirection have any relevance in Unmanaged Approach at all?
                    As in the output window, i can see EntriesPerDirection = 1 & EntryHandling = AllEntries.
                    Can the above be the reason why some orders get just filled once for the first quantity & doesn't follow-up?

                    Q.4. Would a CalculateOnBarClose=true have impact on Order Handling anyways? Can that be the reason why order state remains in PendingChange state for a mighty long time? This could be a stupid question but i'm trying to be non-assuming here.

                    Thanks
                    Last edited by piyushc; 03-06-2014, 05:54 AM.

                    Comment


                      #40
                      Hello piyushc,

                      Thank you for your response.
                      Originally posted by piyushc View Post
                      Q.1. Back to the current coding, how to get out of the situation if the Order is stuck at PendingChange?
                      I am not sure why your order is getting stuck in pending submit.
                      Originally posted by piyushc View Post
                      Q.2. In other case, if the first order got Filled, it did not follow up with the remaining quantity or orders to be followed up after first.
                      Refer post #31 for attachments.
                      i hope you understand that the your suggestion is based on changing the logic while this current coding is not showing any errors at all & since it is more in line with how i would like to do the order management but if there is any real workable error, then i'm more than keen to shift to any other idea quickly enough.
                      I do apologize but I do not understand why you would attempt to code your strategy in this manner. Why not just submit the quantity as 1 for each order and associate exit orders to eah individual entry order?
                      Originally posted by piyushc View Post
                      Q.3. Should i ignore the following...?
                      i have read it in the Help Section but i still need to ask you whether EntriesPerDirection have any relevance in Unmanaged Approach at all?
                      As in the output window, i can see EntriesPerDirection = 1 & EntryHandling = AllEntries.
                      Can the above be the reason why some orders get just filled once for the first quantity & doesn't follow-up?
                      So you are trying to re-submit orders for different quantity? Why? If the order is working why are you re-submitting it? The EntriesPerDirection set to 1 would only have 1 entry submitted.
                      Originally posted by piyushc View Post
                      Q.4. Would a CalculateOnBarClose=true have impact on Order Handling anyways? Can that be the reason why order state remains in PendingChange state for a mighty long time? This could be a stupid question but i'm trying to be non-assuming here.
                      CalculateOnBarClose would mean you calculations are done on the close of the bar rather than intra-bar, you will need to test your strategy to see how this effects your orders.

                      I recommend reviewing the information at the following link to understand debugging your strategy: http://www.ninjatrader.com/support/f...ead.php?t=3418

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      648 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      369 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      108 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      572 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      573 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X