Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

market replay getting numerous fills

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

    market replay getting numerous fills

    I tested my strategy using market replay and my fills for entry and stop/target are being filled with small seperate orders even though I set my order handling by strategy position in the strategy tab.

    ie: I'm trading equities (SPY) and have a limit order of 1000 shares but it gets filled in small quantities of 120 shares, 127 shares, 25 shares ...etc. all the way until my 1000 total. even though the stock is very liquid and I'm sure my 1000 shares would get filled fully in one shot. this occurs for all the trades whether its an entry or stop or target.

    Also here is my code (it seems to work as planned in market replay...except for the above mentioned problem). Will this work if I go live or do I need to use Iorder and stuff (I'm not an advanced programmer and programming this seemed way to easy...so I'm assuming I need to add stuff for error checking and stuff)

    Here is the jist of it:

    protectedoverridevoid Initialize()
    {

    CalculateOnBarClose = false;
    TraceOrders =true;
    }

    protectedoverridevoid OnBarUpdate()
    {
    if (something is true)
    {
    EnterLongLimit(1000, (High[1]+ 0.02), "");
    SetProfitTarget(CalculationMode.Price, (High[1] + (2*(High[1]-Low[2]))));
    SetStopLoss(CalculationMode.Price, (Low[2]- 0.03));
    }


    if (something is true)
    {
    EnterShortLimit(1000, (Low[1]- 0.02), "");
    SetProfitTarget(CalculationMode.Price, (Low[1] - ((High[2]-Low[1]))));
    SetStopLoss(CalculationMode.Price, (High[2]+ 0.03));
    }

    }
    Last edited by deanrumble; 09-15-2008, 11:48 PM.

    #2
    Hello,

    These are partial fills most likely.

    ByStrategyPosition means your strategy orders will be managed for the postion as a whole instead of seperate stop and targets for each fill.

    I suggest going to Tools>Options and turn off Enforce Partial Fills.
    DenNinjaTrader Customer Service

    Comment


      #3
      Also, if you wanted those SetStopLoss() and SetProfitTarget()s to be associated with the different EnterLong/Short orders you have you will want to move them before the entry order. This way it will make the proper stop loss you want at the right time.

      So the order should be as follows:
      SetStopLoss()
      SetProfitTarget()
      then Entry Order
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Ben View Post
        Hello,

        These are partial fills most likely.

        ByStrategyPosition means your strategy orders will be managed for the postion as a whole instead of seperate stop and targets for each fill.

        I suggest going to Tools>Options and turn off Enforce Partial Fills.

        I tried that and it didn't do anything different. I guess my real concern is that if I go live; will this partial fill stuff have a negative effect on my strategy.....or is it possible to hook up NT to my IB paper account to get a more realistic test run?

        Also, I just thought of something.....

        Since I will be using IB as my broker connection (if I decide to purchase to go live) will this order be recognized by IB's TWS as a "smart bracket order"?
        Which is really all I want to accomplish after my "if (condition)" is met.

        PS: I appreciate the prompt responses!
        Last edited by deanrumble; 09-16-2008, 10:45 PM.

        Comment


          #5
          Hello,


          Yes, any order that is sent in NinjaTrader, be it a stoploss, profit target or otherwise will be sent to IB.

          If you have a live license key with us you will have access to paper trade account in IB, you will not if you have a free license.

          Hopefully that helps!
          DenNinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Ben View Post
            Hello,


            Yes, any order that is sent in NinjaTrader, be it a stoploss, profit target or otherwise will be sent to IB.
            But will it be recognized as a bracket order routed through IB's "SMART "ROUTE"?

            Comment


              #7
              Hello,

              Do you mean OCO profit targets and stop losses that are sent with your order? If so, yes, they will be sent with your order.

              I do not know what you mean by "SMART" "ROUTE".
              DenNinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Ben View Post
                Hello,

                Do you mean OCO profit targets and stop losses that are sent with your order? If so, yes, they will be sent with your order.

                I do not know what you mean by "SMART" "ROUTE".
                Yes OCO, thank you.

                by SmartRoute I am refering to how an order gets routed
                for example:

                If you want to buy 100 shares of MSFT then some people would route their order through ARCA and other people through Island etc. whereas IB has a "SMARTRoute" that automaticly picks the best one

                Comment


                  #9
                  We send orders to IB and IB takes over from there. They will route it however they want so they will most likely use their SMARTRoute technology.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Christopher_R, Today, 12:29 AM
                  0 responses
                  9 views
                  0 likes
                  Last Post Christopher_R  
                  Started by sidlercom80, 10-28-2023, 08:49 AM
                  166 responses
                  2,235 views
                  0 likes
                  Last Post sidlercom80  
                  Started by thread, Yesterday, 11:58 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post thread
                  by thread
                   
                  Started by jclose, Yesterday, 09:37 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post jclose
                  by jclose
                   
                  Started by WeyldFalcon, 08-07-2020, 06:13 AM
                  10 responses
                  1,415 views
                  0 likes
                  Last Post Traderontheroad  
                  Working...
                  X