Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Only placing orders during market hours

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

    #16
    Wrong offset. You want to do a negative offset for 0.105 not +0.895.
    Josh P.NinjaTrader Customer Service

    Comment


      #17
      stops during market hours using wizard

      OK thanks -- almost there I think. The first capture shows the 10.5% stop for longs and shorts which only applies during market hours. The second capture shows the 21% profit target. Backtesting shows these working as expected with this exception... there was a trade where the open gapped past the profit stop -- however instead of the exit happening immediately or on the next bar as one might expect it did not happen till the price was exactly at the profit stop! What do I need to adjust so that the exit is at the profit stop OR BETTER??
      Attached Files

      Comment


        #18
        bkout,

        I am not following you. Your stop/targets are calculated based off of whatever entry price you get filled at. If the market gapped up your stop/targets will take that into account for your 10.5% and 21%.
        Josh P.NinjaTrader Customer Service

        Comment


          #19
          OK -- here's the specific trade that concerned me. SKF entered a short position at 54.50. You can see on the capture that the profit stop is set to 24%. 54.50*76% = 41.42. I captured a chart and the settings for the backtest. On 5/7 SKF opened at 39.54 and the first 6 min bar closed at 40.00 after making a high of 40.37. The next bar opened at 39.85 and had a high of 40.64. So my question is why do the chart and trade report show an exit on the first candle at 41.42? That price was not even reached till the third candle. Somehow the exit took place exactly at the 24% profit price -- should have been lower. Over the last year whenever the profit stop is hit the exit is always at 24.00% !! Something is off.
          Attached Files
          Last edited by bkout; 05-11-2009, 08:37 AM.

          Comment


            #20
            Not sure I am following you. The bar you have in your screenshot gapped down. It will exit at 41.42 when price gaps down past 41.42.
            Josh P.NinjaTrader Customer Service

            Comment


              #21
              No -- a limit order should be filled at the limit price OR BETTER. If you are short and the market opens below your limit buy to cover order the fill should be at that trading level -- it should NOT wait untill price rises back to the limit price.

              Comment


                #22
                Not following you. I don't see any waiting for anything. Since the market opened below the market, that is why it closed the trade on that bar. It is not waiting for price to come back. In backtesting a limit order will fill you at the limit price to prevent overstating of performance.
                Josh P.NinjaTrader Customer Service

                Comment


                  #23
                  OK the last part of what you said reveals the problem. If that's the way the backtest has to be I guess that's the end of it, but I think you would be providing a much more realistic backtest by filling at the available price even if it was the high of the bar. You said that you "don't see any waiting for anything" -- but the fill price was not available on the bar that shows the position closed -- look at how the little triangle is "up in the air" above the bar. Anyway I would request to have the option of having a profit target hit at a realistic trading price rather than the limit.

                  Beyond that please tell me how the setup I have now will handle this gap situation in live trading -- would it exit at the open or at the open of the second bar?

                  Thanks for explaining -- at least it's clearer what is happening.

                  Comment


                    #24
                    bkout,

                    You can try switching between the liberal and the default fill algorithms. If you do not find one that fits your needs you can also try making your own. Unfortunately we do not support this though: http://www.ninjatrader-support.com/H...FillTypes.html

                    In live trading it depends on your CalculateOnBarClose settings. It will exit whenever the conditions deem it feasible to exit.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      Just to verify something -- I want to confirm that the backtest outcome you describe does NOT apply to stop losses. If I have a 10% stop on a long position and the market opens down 20% I want my backtest to show a 20% loss. From looking at backtests it looks like that it will show the 20% loss -- is that correct? Thx

                      Comment


                        #26
                        That is correct. Stop orders are ultimately market orders. Limit orders are not.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #27
                          Ran into a problem this morning. Normally my system if it is long and gets a EMA cross signal then it closes the long and goes short. The system does have a stop loss and a profit target. Today the stop loss was hit and the long position exited. So far so good. But when a short position triggered Ninja didn't seem to know about the previous long having been exited via the stop so it "exited" (really shorted) the number of shares that had been the long position in addition to (corrrectly) entering the short. So I ended up with basically a double position short. How do I use the wizard to make sure this doesn't happen again? Thanks

                          Comment


                            #28
                            bkout,

                            Please provide more information as to the exact order types submitted. Did you try to scale out without scaling in?
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #29
                              No but I *may* have adjusted the order for slight error in number of shares -- not sure as it has been a busy morning. Will send orders and log to you at support.

                              Comment


                                #30
                                bkout,

                                That could be it. If you have some unmatched order share quantity it will cause problems. Please ensure they are tidy. If your entry was 100, your exit should be 100. If you want a 50-50 split exit, you need two entries of 50 each.
                                Josh P.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by argusthome, 03-08-2026, 10:06 AM
                                0 responses
                                103 views
                                0 likes
                                Last Post argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                52 views
                                0 likes
                                Last Post NabilKhattabi  
                                Started by Deep42, 03-06-2026, 12:28 AM
                                0 responses
                                33 views
                                0 likes
                                Last Post Deep42
                                by Deep42
                                 
                                Started by TheRealMorford, 03-05-2026, 06:15 PM
                                0 responses
                                36 views
                                0 likes
                                Last Post TheRealMorford  
                                Started by Mindset, 02-28-2026, 06:16 AM
                                0 responses
                                73 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Working...
                                X