Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy + ATM?

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

    #16
    dsraider,

    When you press Reset DB, you will not lose your ATM templates or your NinjaScript strategies.

    What it will remove is this:
    1. Historical orders
    2. Historical executions
    3. Historical ATM strategy data

    What will not be removed:
    1. ATM strategy templates
    2. Historical chart data
    3. NinjaScript is not touched
    Josh P.NinjaTrader Customer Service

    Comment


      #17
      Josh, it worked! My computer and I thank you. Maybe I'll just stick to calculate on bar close: true from now on...

      Dave

      Comment


        #18
        Okay, so now the orders fill when they're supposed to but when they do, my ATM Strategy doesn't work right. Here is the relevant coding:

        if (CrossAbove(EMA(50), EMA(200), 1))
        {
        atmStrategyId = GetAtmStrategyUniqueId();
        orderId = GetAtmStrategyUniqueId();
        AtmStrategyCreate(Action.Buy, OrderType.Market, Low[
        0], 0, TimeInForce.Day, orderId, "ES 1", atmStrategyId);

        My ATM Strategy is named "ES 1" - it has a target of 4, a stop of 6 and a break-even strategy where at +3 ticks, my stop is moved to +1 tick. However, the break-even isn't working, it's not selling at target and my stop is moving up and down on it's own. Do I need an exorcism or different coding?

        Thanks.

        Comment


          #19
          Have you checked the ATM template itself (ES 1) on the simulated feed that it does what you had in mind?
          BertrandNinjaTrader Customer Service

          Comment


            #20
            Hi Bertrand,

            Yes, it seems to work perfectly when I place the trade manually. Once or twice it wouldn't automatically sell upon hitting target but I was told that while live trading is FIFO, the simulator is sometimes not as quick.

            Also, please note that I do not have a trailing stop as part of my ATM.

            Comment


              #21
              dsraider, yes that would depend on your position in the order queue, either sim or in realtime, in illiquid situations it may have to trade through to fill you. I would suggest you create a fresh template with just a target and a stop and no stop strategy and retest this. Or you add your custom template to the 'SampleAtmStrategy' provided per default as NinjaScript strategy and see if that executes as you had in mind.
              BertrandNinjaTrader Customer Service

              Comment


                #22
                Not perfectly sure if this is what you meant but I took my breakeven out of my ATM and left a target and stop. The cross occured, it shorted, went in my favor a few ticks, then went back to entry and sold, saying "stop filled" even though my stop was 6 ticks behind entry.

                Does changing the ATM AFTER Automated Strategies are created cause it to malfunction? I didn't expect the Strategies to have a memory and figured they would just signal whatever configuration of my ATM was current?

                Comment


                  #23
                  dsraider,

                  If you modify your ATM strategy it will not be effective till your next ATM strategy is activated. Whatever was running beforehand is not influenced.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #24
                    Okay, then any ideas why ATM is changing my stop at will? I obviously can't have this happen in live trading and am anxious to use this automated/ATM setup.

                    Thanks.

                    Comment


                      #25
                      dsraider, did you save the ATM strategy after you removed the stopStrategy from it? If not, please consider doing this and saving it to fresh template like ES2 and use this then in your strategy to test.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #26
                        Will do, Bertand. Thanks. Also, "Stop & Target Submission" is set to PerEntryExecution. Should I change it to ByStrategyPosition? I'm not sure if that makes a difference.

                        Thanks.

                        Comment


                          #27
                          This should not matter if you test this with one contract only to debug - http://www.ninjatrader-support.com/H...tegiesTab.html
                          BertrandNinjaTrader Customer Service

                          Comment


                            #28
                            Okay, tried everything you suggested. A cross occured, ATM went short when it should have. The market bounced a few ticks here and there and then, out of nowhere, my stop (which was 6 points back) jumped to +1 tick and immediately sold, leaving me down 1 tick. Please help before my monitor goes out the window.

                            Thank you.

                            Comment


                              #29
                              dsraider, please contact me at support at ninjatrader dot com with your trace and log file from today, I'll need to review where the stop modification comes from - just to doublecheck when you open your ATM template please make sure the stop strategy is set to 'none'. Then save the template and restart the strategy.
                              BertrandNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by andrewtrades, Today, 04:57 PM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by chbruno, Today, 04:10 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post chbruno
                              by chbruno
                               
                              Started by josh18955, 03-25-2023, 11:16 AM
                              6 responses
                              436 views
                              0 likes
                              Last Post Delerium  
                              Started by FAQtrader, Today, 03:35 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post FAQtrader  
                              Started by rocketman7, Today, 09:41 AM
                              5 responses
                              19 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Working...
                              X