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 ATM Stop strategy in my own Strategy

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

    Using ATM Stop strategy in my own Strategy

    Hello!
    I created my own strategy in NinjaScript. It works and enters positions in right ways, but I need one more thing to work it on 100%. That's a using NinjaTrader ATM strategy for stop losses.

    For example I created and saved ATM Strategy (from the ChartTrader or from the SuperDom) and called it StopLoss5min. What code do I need to write in my own strategy to use this ATM when my own strategy entering any position?

    Thanks!

    #2
    Hello YevhenSkynkarenko,

    Thank you for your post and welcome to the Forums!

    You would want to look at the sample atm strategy that we have pre-built in the NinjaTrader platform; Tools -> Edit NinjaScript -> Strategies -> SampleAtmStrategy

    Additionally, you will want to take a look at the different methods for Atm Strategy order submission with NinjaScript from our help guide -
    http://www.ninjatrader.com/support/h...gy_methods.htm

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Hello YevhenSkynkarenko,

      Thank you for your post and welcome to the Forums!

      You would want to look at the sample atm strategy that we have pre-built in the NinjaTrader platform; Tools -> Edit NinjaScript -> Strategies -> SampleAtmStrategy

      Additionally, you will want to take a look at the different methods for Atm Strategy order submission with NinjaScript from our help guide -
      http://www.ninjatrader.com/support/h...gy_methods.htm

      Let me know if I can be of further assistance.
      Big Thanks! It works well!
      But now I have one more important question.

      Now my strategy entering on market on every signal it haves, even thought I already have active order.
      How can I "limit" my strategy to use only one order when I'm in trade and don't open any other position unless it closes by stop or profit tatget.
      So, for example:

      Strategy opened Long position by the signal with 1Lot. If Strategy gets a new signal for Long it openes it again and I have position with 2Lots. But I don't want it. I want to have position with 1Lot and Strategy must wait untill my first position will be closed.

      Thanks!

      Comment


        #4
        YevhenSkynkarenko,

        The Sample strategy shows you how to accomplish this. You can check if the GetAtmStrategyMarketPosition != MarketPosition.Flat and then either return the method or handle it a different way that you see fit.

        The sample will only submit when the already working ATM has become flat and thus resets the string IDs.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Cal View Post
          YevhenSkynkarenko,

          The Sample strategy shows you how to accomplish this. You can check if the GetAtmStrategyMarketPosition != MarketPosition.Flat and then either return the method or handle it a different way that you see fit.

          The sample will only submit when the already working ATM has become flat and thus resets the string IDs.
          Big thanks! Everythings works good!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by PhillT, Today, 02:16 PM
          2 responses
          3 views
          0 likes
          Last Post PhillT
          by PhillT
           
          Started by Kaledus, Today, 01:29 PM
          3 responses
          9 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by frankthearm, Yesterday, 09:08 AM
          14 responses
          47 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by gentlebenthebear, Today, 01:30 AM
          2 responses
          13 views
          0 likes
          Last Post gentlebenthebear  
          Started by PaulMohn, Today, 12:36 PM
          2 responses
          17 views
          0 likes
          Last Post PaulMohn  
          Working...
          X