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 geotrades1, Today, 10:02 AM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by ender_wiggum, Today, 09:50 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by rajendrasubedi2023, Today, 09:50 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by bmartz, Today, 09:30 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by geddyisodin, Today, 05:20 AM
          3 responses
          26 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X