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

Programatically pick up result of ATM trade

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

    Programatically pick up result of ATM trade

    Is there a way of coding an indicator to pick up the result of an ATM trade? I'm thinking something similar to OnOrderUpdate() in a strategy?

    -thanks

    #2
    Hello laparker,

    Results of an ATM strategy can only be accessed from within Strategy. You'll then use the GetATM() functions like the one below:



    There is a built in Strategy you can use for help on accessing an ATM strategy within a NinjaScript strategy. See the SampleATMStrategy as well as the reference sample below for help with this:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply. It's not quite what I want to do. I want to enter trades manually and exit with an ATM strat. My ideal right now would be:

      1 Trade right off the chart using Chart Trader
      2 Use an ATM strategy
      3 Update the strat parameters from an indicator
      4 Pick up the trade performance and write it to a file.

      1 and 2 I can do. 3 I have read is not possible. 4 the GetATM() methods look like they only work in a strategy, not an indicator.

      Is there another way of attacking this?

      -thanks

      Comment


        #4
        Hello,


        It sound like you're trying a combination of discretionary entries and automatic exits. The system is not setup for this except for the standard ATM settings that you can modify within the GUI.

        You can definitely code in logic that can change the profit targets and stop losses based on an indicator, but combining this with the discretionary entries isn't possible.

        You're right that the GetATM() functions can only be used in a strategy.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        939 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        8 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        4 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        28 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        33 views
        0 likes
        Last Post wzgy0920  
        Working...
        X