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 burtoninlondon, Today, 12:38 AM
          0 responses
          5 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          14 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          13 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,983 views
          3 likes
          Last Post jhudas88  
          Working...
          X