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

Create an ATM with Indicator crossing

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

    Create an ATM with Indicator crossing

    I am interested in creating an ATM where the price crosses an indicator and triggers a sell signal. Is there a sample code on how to do this on ninjascript?

    Thank you
    Yandy Chang

    #2
    Hello Yandychang,

    There is a sample which comes with NinjaTrader that demonstrates using ATM strategies from NinjaScript. This is a Strategy named "SampleATMStrategy". This shows how to use a condition to place an atm trade.

    The ATM system is very specific, so if you have simple target needs this is useful for those cases. If you need to do more advanced target placement or movements, I would suggest to just use the regular Managed or Unmanaged strategy approaches.







    I look forward to being of further assistance .
    JesseNinjaTrader Customer Service

    Comment


      #3
      would a managed and unmanaged approaches allow me to use discretionary order placement, and automatically kick in once the my orders are accepted?
      I was under the impression that strategy class is for signal generation and management once those signals are executed.

      Comment


        #4
        Hello Yandychang,

        I am not certain I understand the wording you used here.

        would a managed and unmanaged approaches allow me to use discretionary order placement, and automatically kick in once the my orders are accepted?
        Can you explain what you mean by this in more detail?

        The managed/Unmanaged approach allow for more control over the targets is mainly what I had meant. The ATM strategy assumes the targets are pre-configured in the template, after it is submitted you would be unable to do other changes to the targets. If you needed more control over the targets, ATM is not likely the best choice and using Managed or Unmanaged would give you that control.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          What I meant is:
          I understood that Strategies are for fully automated systems, where the system generates the signals, Once those signals are triggered, the strategy can set up the targets and stop losses. I also understood that ATMs are for trade management with discretionary trading, where the trader enters the market, and the ATM manages the trade. At least in NT7, A trader cannot use both the automated strategies, and the chart trader for discretionary trading. What I am trying to do is the following: Once I enter the market, I want to create an ATM, but instead of having target and stop loss, I want my stop loss to be my supertrend indicator, or the SMA(50), or whatever conditions I choose to be my exit signal.

          Comment


            #6
            Hello Yandychang,

            Thanks for clarifying that.

            Your understanding is correct of each type, a NinjaScript strategy is for trading on your behalf and an ATM would be only for the targets but would also include yourself for the discretionary part.

            If you are trying to customize the exit like you described, a NinjaScript strategy would likely be the best for that use case. However discretionary trading is not possible out of the box with a strategy. It sounds like you want to combine manual trading with some automation for the targets which is a more difficult subject surrounding strategies.

            For what you are describing, very likely you would benefit to use NT8 here. In NT7 there is nothing specific which allows manual trading to be combined with logic, mainly you have manual trading, ATM or Strategies. In NT8 you have the additional addon framework which can be used for this specific case. I just wanted to mention that this type of system is possible, it is just not nearly as easy in NT7.

            For NT7 you would very likely be looking at undocumented approaches if you wanted to enter manually and then have that followed up by an automated action. You can find a post about observing the account in the following link. Observing the accounts executions would be one way to go about doing this. This syntax would generally be executed from an Indicator instead of a strategy which is also another item to consider, you cannot backtest a system like this and it would only work going forward. This is not a supported/documented concept in NT7 but is going forward in NT8. You can find some general information for 7 here:

            To learn more about addons please see the following:


            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Aviram Y, Today, 05:29 AM
            4 responses
            11 views
            0 likes
            Last Post Aviram Y  
            Started by algospoke, 04-17-2024, 06:40 PM
            3 responses
            27 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by bmartz, 03-12-2024, 06:12 AM
            3 responses
            30 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Started by gentlebenthebear, Today, 01:30 AM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by cls71, Today, 04:45 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X