Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What I'm doing wrong? On Reverse...

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

    What I'm doing wrong? On Reverse...

    Hi support...

    I'm a little bit confused of what's going wrong with my test implementation.
    I develop a strategy which places a limit order and wait than for the fill. If the fill isn't triggered and the reverse signal is rising everything works well. But if I was filled, there will be only close the current position, canceling the attached sto/target, but the new limit order will not be placed....

    See attachements for further informations

    many thanks
    cicondo
    Attached Files

    #2
    cicondo, from the traces output you're not running into ignored orders (Internal Order Handling Rules), so I would suggest to simplify your code to debug where it does not work to place the reveral for you. For example what I spot is when you're long and recognizing a short entry, you work with ExitShort(), where you should work with EnterShort() to reverse the position.

    Comment


      #3
      Hi Bertrand,

      thank'S a lot of you ideas. I have found the bug, so it works pefect with limt and market orders and a free choice of targets.
      I must say it is hard to find out what's going wrong in a realtime system in combination with threaded callbacks...
      But now I know excatly what it is doing the correct way...

      Many, many thanks.
      cicondo

      PS: The core problem is that it is an other kind of stuff to write a stretegy for your own use, instead for paying customers. this needs a much more robust coding.
      By the way...if there is something wrong by placing an order, get I informed by a try/catch clause?


      Originally posted by NinjaTrader_Bertrand View Post
      cicondo, from the traces output you're not running into ignored orders (Internal Order Handling Rules), so I would suggest to simplify your code to debug where it does not work to place the reveral for you. For example what I spot is when you're long and recognizing a short entry, you work with ExitShort(), where you should work with EnterShort() to reverse the position.

      Comment


        #4
        cicondo, you're welcome - for debugging your order behavior the TraceOrders feature would do it.

        For a better debugging environment, please see this link - http://www.ninjatrader-support.com/H...ualStudio.html

        For a reference sample on 'Try and Catch' blocks, please see this one - http://www.ninjatrader-support2.com/...ead.php?t=9825

        Comment


          #5

          Thank's

          For the Try/Catch...I asked for was not the concept of using this feature, it was more in handling with ordering problem. Is there any effect to use it for the ordering process? Means if there is something wrong throws the ordersystem an exception?

          And thanks again
          cicondo

          Originally posted by NinjaTrader_Bertrand View Post
          cicondo, you're welcome - for debugging your order behavior the TraceOrders feature would do it.

          For a better debugging environment, please see this link - http://www.ninjatrader-support.com/H...ualStudio.html

          For a reference sample on 'Try and Catch' blocks, please see this one - http://www.ninjatrader-support2.com/...ead.php?t=9825

          Comment


            #6
            cicondo, no this is related to debugging your code - for debugging your order behavior and feedback you get from those, please work with TraceOrders and the output window -

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            649 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            576 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X