Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Using ATMStrategy from within my own custom strategy

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

    Using ATMStrategy from within my own custom strategy

    Hello,
    Is it possible to use the ATM built in strategy from within my own strategy ?
    I would like to be able to see the inputs properties of the ATM Strategy in my input parameters window
    I would like to send trade signal to the ATM and the strategy will manage my trade

    Thanks

    #2
    Hello yaniv,

    Yes you can use atms in strategies, you would need to see the SampleATMStrategy script that comes with the platform for an example of how to do that. You cannot use the strategy builder for ATM's so it would need to be manually coded.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks !
      But when entering a position using the ATM, the statistics of the strategy are not updated, what should I do to make this happen?

      Comment


        #4
        Hello yaniv,

        That is correct because you are using an external ATM strategy, NinjaScript strategies can launch an ATM but will not have any information about it. If you want to track statistics you need to use a strategy based order and not an ATM.
        JesseNinjaTrader Customer Service

        Comment


          #5
          OK, Thank you very much
          And how can I exit a position that was entered using ATM, lets say after x bars (and not with stop loss or profit target) ? ExitLong() does not work

          Thanks

          Comment


            #6
            Hello yaniv,

            You would need to change one of the targets price close to the market so it can fill or use AtmStrategyClose to close the position and cancel the targets. When using an ATM that relies on its stop or target to exit the trade unless you call AtmStrategyClose. If you want to submit your own exits using ExitLong you would have to not use an ATM and instead use the managed approach.

            The methods that can be used for ATM's would be the ones in the following link: https://ninjatrader.com/support/help...gy_methods.htm

            JesseNinjaTrader Customer Service

            Comment


              #7

              When using ATM strategy into my own strategy using tight stop loss (2-3 ticks), sometimes when the market makes a quick move I get an error saying that the stop market price is higher than the current price,
              how can I handle that ?

              Thanks

              Comment


                #8
                Originally posted by yaniv View Post
                When using ATM strategy into my own strategy using tight stop loss (2-3 ticks), sometimes when the market makes a quick move I get an error saying that the stop market price is higher than the current price,
                how can I handle that ?

                Thanks

                This is something that I hope they take care of in the next update because those pop up errors are so bad that you almost have to restart the program.

                Comment


                  #9
                  Hello yaniv,

                  In an ATM strategy there is not a way to handle that besides using further offsets. If you submit an ATM and the calculated target is on the wrong side of the market when it gets submitted due to being too close to the active market you would get that error. In manual coding you could handle rejections but you would still get a popup about that happening so it is best to avoid placing orders too close to the active market in fast moving markets.
                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    Hey I have similar but reverse question ...
                    I am looking to enter scalps manually and then have it be taken over by a strategy. Maybe this can be done by "coding" an ATM strategy? In other words, I want to be able to manually place my entry stop/limit order and have a strategy manage the position. Is this possible? Help on how?

                    Comment


                      #11
                      Hello cmbynes,

                      For this you would not want to use a strategy, but instead use the addon approach with an indicator or addon.

                      I have two examples that have concepts that when combined would achieve this.

                      The AtmStrategyIdentifier demonstrates getting orders made manually from an Account object.
                      This indicator serves to provide labels for Atm strategies that are present on your chart. Each new Atm strategy will rotate through the colors defined in your Brush Collection. Simply add to a chart, select the data series you want to have labels added to, choose your font and add all the brushes/colors you want […]


                      The ProfitChaseStopTrailIndicatorExample demonstrates managing orders from an Account through the addon approach.
                      Chelsea B.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by carnitron, Today, 08:42 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post carnitron  
                      Started by strategist007, Today, 07:51 PM
                      0 responses
                      7 views
                      0 likes
                      Last Post strategist007  
                      Started by StockTrader88, 03-06-2021, 08:58 AM
                      44 responses
                      3,974 views
                      3 likes
                      Last Post jhudas88  
                      Started by rbeckmann05, Today, 06:48 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post rbeckmann05  
                      Started by rhyminkevin, Today, 04:58 PM
                      4 responses
                      58 views
                      0 likes
                      Last Post dp8282
                      by dp8282
                       
                      Working...
                      X