Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Advanced Order Handling - Help please!

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

    Advanced Order Handling - Help please!

    I'm hoping someone could talk me through Advanced Order Handling if possible. I have read the guides and made some progress but cannot seem to get it to work and am having a hard time following the technical guides.

    This is very basically what I'm trying to achieve:

    • enter a long or short position by a stop order at a slightly offset level once an indicator confirms - Can do this ok.
    • Build in a cancel function whereby if the offset is not reached and price falls below the low of the bar the entry order was placed, the order is cancelled - I think I can do this.
    • Once the order is executed, enter a protective stop at the low (or high if short) of the entry bar minus an offset. - I'm not sure about this, I tried to do it via the OnExecution() function. When testing a stop order is sent but cancelled straight away. Not sure why!
    • The strategy should then reverse position when the indicator triggers again. - Not attempted this yet!

    Any pointers you could give would be greatly appreciated, my hairline is visibly receding here!!

    Thanks

    Mark
    Last edited by MJUK05; 04-05-2010, 09:40 AM.

    #2
    Mark, sorry for our late reply here.

    First of all please ensure to read the background info from those links below -

    General order handling and Internal Order Handling Rules (botton section) -



    For any order related debugging please work with our Trace Orders feature -



    For reversing on a signal when not working with Market Orders for entry, please ensure you actually wait for a confirmed cancelled orderstate of the resting and to be cancelled entry order, otherwise you would easily run into the above mentioned order handling rules.

    Comment


      #3
      Bertrand,

      Thanks for the response. As I said, however, I've been through all the guides and cannot get my head around them. I'm not a programmer so have a hard time with basic development let alone the advanced order stuff.

      If you cannot talk me through the advanced stuff in more laymen language, perhaps you could help me try and solve my issue without having to use the advanced order management system.

      How do i cancel a enterlongstop( @ offset price) if it is not triggered (due to the offset) and price moves below the order entry price? I tried the cancelOrder() function but it seems to be just for Iorders. Is there anyway of doing this with out the advanced order system?

      Thanks

      Mark

      Comment


        #4
        Mark, for this you would have to use the CancelOrder method providing an IOrder to cancel.

        You can also just submit the order each bar a new as long as you want to be filled (within the desired offset limit) as orders expire per default at the end of the bar (if not set to liveUntilCancelled), this means there's no need then for you to explicitly cancel it.

        Should you wish to take a look at the first CancelOrder() approach, this would be a relevant sample with code snippets to assist you in getting started -

        When using NinjaTrader's Enter() and Exit() methods, the default behavior is to automatically expire them at the end of a bar unless they are resubmitted to keep them alive. Sometimes you may want more flexibility in this behavior and wish to submit orders as live-until-cancelled. When orders are submitted as live-until

        Comment


          #5
          Could you give me an example of how submitting an order on each bar would work please?

          The cancelorder function, being part of advanced order management is just too hard for me to understand, and i'm not going to trade live with something i don't understand.

          Comment


            #6
            Yes, please check for example the attached simple script from the wizard, by default limit order expire at the end of bar, which means you will see multiple arrows plotted on the chart as the conditions trigger for order placement, not all trades of course execute as the strategy tried to get the limit order fill - so it will resubmit the limit order on the next bar if it was not filled and the conditions for entry are still lining up.
            Attached Files

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            607 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            353 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            560 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            561 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X