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 junkone, Today, 11:37 AM
          0 responses
          3 views
          0 likes
          Last Post junkone
          by junkone
           
          Started by quantismo, 04-17-2024, 05:13 PM
          5 responses
          34 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by proptrade13, Today, 11:06 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by love2code2trade, 04-17-2024, 01:45 PM
          4 responses
          34 views
          0 likes
          Last Post love2code2trade  
          Started by cls71, Today, 04:45 AM
          2 responses
          10 views
          0 likes
          Last Post eDanny
          by eDanny
           
          Working...
          X