Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

1 ATM order at a time, please

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

    #31
    Haha well...

    I actually already went through export problems. I tried exporting both the strat and the custom indicator it calls, but it still wouldn't work.

    My stops are set to 8 ticks behind entry price so I can't imagine how they'd be misinterpreted.

    I'm not sure what you meant with respect to limit orders. Also, the link brought me to the Overview page. Was that the right one?

    Trace Orders is set to true under Initialize but I still couldn't figure it out.

    It's not paranoia if everyone actually IS out to get you, right?

    Comment


      #32
      Dave, correct, this is a link to the orders overview page, the internal order handling rules are listed at the botton here.

      Did you open the output window in the Control Center so you can review the TraceOrders output?

      For the stops I suggest you print out entryprices and stopprices to the output window, too to check where you would run into a scenario that submits those invalid stop orders.

      Comment


        #33
        Fair enough. I will look into printing out entry and stop prices. Thanks. In the meantime, any hints on proper coding for an entry limit order, where my longs are divided into "Long 1a" and "Long 1b"? It's one thing for issues to occur after order entry but I can't even get my limits to signal at all. And I think I've tried all combinations...

        I did check out the Output window. To me, it looks like it cancelled due to expiration, but since my orders are set to enter upon bar open and are currently market order, that's impossible. When my order was immediately rejected, windows came up explaining that I can't set a stop (as much as) 9 points over price. My stops are set at 8 ticks, so I just don't get it:

        2/2/2010 3:12:15 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='Long 1a' Mode=Ticks Value=8 Currency=0 Simulated=False
        2/2/2010 3:12:15 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='Long 1b' Mode=Ticks Value=8 Currency=0 Simulated=False
        2/2/2010 3:12:15 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='Short 1a' Mode=Ticks Value=8 Currency=0 Simulated=False
        2/2/2010 3:12:15 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='Short 1a' Mode=Ticks Value=8 Currency=0 Simulated=False
        2/2/2010 3:12:15 PM Entered internal PlaceOrder() method at 2/2/2010 3:12:15 PM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Long 1a' FromEntrySignal=''
        2/2/2010 3:12:15 PM Entered internal PlaceOrder() method at 2/2/2010 3:12:15 PM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Long 1b' FromEntrySignal=''
        2/2/2010 3:12:15 PM Cancelled expired order: BarsInProgress=0: Order='NT-01451/Sim101' Name='Stop loss' State=Cancelled Instrument='ES 03-10' Action=Sell Limit price=0 Stop price=1096.25 Quantity=1 Strategy='RaiderTrendStrat' Type=Stop Tif=Gtc Oco='NT-00915' Filled=0 Fill price=0 Token='3f7a2bb4b95e4ba2bfd49605e4aa8dda' Gtd='12/1/2099 12:00:00 AM'
        2/2/2010 3:12:15 PM Cancelled pending exit order, since associated position is closed: Order='NT-01455/Sim101' Name='Stop loss' State=Working Instrument='ES 03-10' Action=Sell Limit price=0 Stop price=1099.25 Quantity=1 Strategy='RaiderTrendStrat' Type=Stop Tif=Gtc Oco='NT-00918' Filled=0 Fill price=0 Token='ff169705afc34021938cd5bca85124ff' Gtd='12/1/2099 12:00:00 AM'
        2/2/2010 3:12:15 PM Cancelled OCO paired order: BarsInProgress=0: Order='NT-01455/Sim101' Name='Stop loss' State=Cancelled Instrument='ES 03-10' Action=Sell Limit price=0 Stop price=1099.25 Quantity=1 Strategy='RaiderTrendStrat' Type=Stop Tif=Gtc Oco='NT-00918' Filled=0 Fill price=0 Token='ff169705afc34021938cd5bca85124ff' Gtd='12/1/2099 12:00:00 AM'
        2/2/2010 3:12:15 PM Cancelled pending exit order, since associated position is closed: Order='NT-01457/Sim101' Name='Stop loss' State=Working Instrument='ES 03-10' Action=Sell Limit price=0 Stop price=1099.25 Quantity=1 Strategy='RaiderTrendStrat' Type=Stop Tif=Gtc Oco='NT-00919' Filled=0 Fill price=0 Token='476f12b18e14415896b1788fb78b17d1' Gtd='12/1/2099 12:00:00 AM'
        2/2/2010 3:12:15 PM Cancelled OCO paired order: BarsInProgress=0: Order='NT-01457/Sim101' Name='Stop loss' State=Cancelled Instrument='ES 03-10' Action=Sell Limit price=0 Stop price=1099.25 Quantity=1 Strategy='RaiderTrendStrat' Type=Stop Tif=Gtc Oco='NT-00919' Filled=0 Fill price=0 Token='476f12b18e14415896b1788fb78b17d1' Gtd='12/1/2099 12:00:00 AM'

        I've read through IOs as I plan on having these orders self-cancel, should they run a certain number of ticks before filling. Unfortunately, I didn't find an answer there, though. Hopefully, some of what I've just posted will help.

        Thanks.

        Comment


          #34
          dsraider, looks like the stops got cancelled as you reversed to me - you're running with unique entry handling and order handling set to per entry execution, right?

          Comment


            #35
            Morning Bertrand,

            Yes and yes.

            However, the order cancelled the exact moment in entered. Also, the indicator signals on which it is based makes it impossible for it to reverse in the same bar. I wish I could post the little window that came up, saying I can't set a stop (for example) at 1095 when my entry was 1086 long.

            Thanks.

            Comment


              #36
              Dave, you would need to debug your stop loss order values, a sell stop order for long position 8 pts above the market would for sure get rejected.

              Comment


                #37
                Lol yes, I'm aware of that...

                I commented out the parts that won't compile for you and have replaced them with simple Close v Open logic just so you can see what I see. Do you see anything wrong with my stop code?

                Thanks.
                Attached Files

                Comment


                  #38
                  Please print out newPrice, prevPrice variables to ensure the deliver as you would expect, also please there's a minor bug in your reset of values - should be like below

                  Code:
                   
                  SetStopLoss("Short 1a", CalculationMode.Ticks, 8, false);
                  SetStopLoss("Short 1b", CalculationMode.Ticks, 8, false);

                  Comment


                    #39
                    Added PrintWithTimeStamp for both previousPrice and newPrice as suggested and eventually saw the 1a/1a code I had. Life is just one giant blur right now

                    Thanks!
                    Last edited by dsraider; 02-03-2010, 11:43 AM. Reason: Because I am dumb and didn't see something obvious

                    Comment


                      #40
                      You're welcome - yes, it was hiding in the 'switch' one for the reset...

                      Comment


                        #41
                        That's because it hates me. Luckily, I now have my tin foil hat strapped on extra tight so it can't read my thoughts. Thanks for all the help you've given so far. While I'm not done, I do promise not to bother you for a good, oh, ten minutes

                        I know NT takes suggestions so I wanted to suggest that a wizard for advanced strategies like this one be built. I have it all in my head (under the tin foil) and would be happy to go into more detail if interested.

                        Anyway, thanks again.

                        Dave

                        Comment


                          #42
                          Dave, I can understand and thanks for the enhancement suggestion, I'll pass it on.

                          Comment


                            #43
                            Forgot to ask. Any reason why my limit orders aren't firing?

                            Comment


                              #44
                              Hi Dave, rechecked your earlier posted code, should have seen it sooner (region command 'hid' it for me, too) ...please move the entry logic to the OnBarUpdate(), currently sits in OnOrderUpdate() portion.

                              Thanks

                              Comment


                                #45
                                Will the fact that I'm making this an IOrder (with a subsequent CancelOrder command) change that?

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by NullPointStrategies, Today, 05:17 AM
                                0 responses
                                20 views
                                0 likes
                                Last Post NullPointStrategies  
                                Started by argusthome, 03-08-2026, 10:06 AM
                                0 responses
                                119 views
                                0 likes
                                Last Post argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                63 views
                                0 likes
                                Last Post NabilKhattabi  
                                Started by Deep42, 03-06-2026, 12:28 AM
                                0 responses
                                41 views
                                0 likes
                                Last Post Deep42
                                by Deep42
                                 
                                Started by TheRealMorford, 03-05-2026, 06:15 PM
                                0 responses
                                45 views
                                0 likes
                                Last Post TheRealMorford  
                                Working...
                                X