• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Default stops and targets in SampleMACrossOver

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

    Default stops and targets in SampleMACrossOver

    Hi,

    The sample SampleMACrossOver has only the 'EnterLong' and 'EnterShort' functions in the code. However when I run the backtest there are stops and targets kicking in to close the trades, I can see those in the results.

    Are there some default settings set somewhere for the stops and limits? can I modify these without changing the code?

    I am aware that I can set stops and limit by changing the code to use EnterLongStopLimit() and EnterLongLimit(), for example.

    Thanks

    #2
    Downton, welcome to our forums - in the SampleMACrossOver provided by NT per default there are no stops and targets defined at all - it would only reverse or exit on close.

    Can you please post a screenshot perhaps of the market / settings and stop executions you see in your case?

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Stops/Limites in SampleMACrossOver

      Thanks for the quick reply.

      An image in a .DOC file is attached.

      I can see that there is a Buy trade on the crossver of the greenMA over the orangeMA. But I can't see why, in the next bar, that trade is closed (so I assumed that there was a stop
      loss setting somewhere) and a short is opened (puzzled about that, there is no crossover). And puzzled again about why that last short is then closed in the 22:15 bar.

      Thanks
      Attached Files

      Comment


        #4
        Thanks, that not a stop out, but an ExitOnClose as the session is then ending there in your timezone.

        If you do not wish to use this default exit, just set ExitOnClose = false in the Strategy paramters and it would hold this trade overnight until reversal.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks Bertrand, makes complete sense now.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by jleira, Today, 10:26 PM
          0 responses
          4 views
          0 likes
          Last Post jleira
          by jleira
           
          Started by wuileng, Today, 10:14 PM
          0 responses
          6 views
          0 likes
          Last Post wuileng
          by wuileng
           
          Started by mntemel, Today, 09:07 PM
          1 response
          10 views
          0 likes
          Last Post MojoJojo  
          Started by martyn73, Today, 08:22 PM
          0 responses
          10 views
          0 likes
          Last Post martyn73  
          Started by RobertoPaez, Today, 08:13 PM
          0 responses
          5 views
          0 likes
          Last Post RobertoPaez  
          Working...
          X