Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to access the selected ATM Target 1 Profit and Stop Loss values

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

    How to access the selected ATM Target 1 Profit and Stop Loss values

    I am writing an indicator and would like to draw lines on the chart to indicate the currently selected ATM target and stop loss values to show where the orders would be placed if the order is entered.

    I have the indicator working and plotting the values from two NinjaScriptProperty values but would like them to be dynamic based on the current ATM strategy. The entry position is calculated based on the current and prior bar levels and their relation to the moving average plots and that is working ok.

    Eventually I would like to make it so that if a Target 2 or 3 were added, they would be plotted also, but for now Target 1 will be enough.

    Here is a picture: https://app.screencast.com/Tn39Y9f8OYBqf

    Any help would be greatly appreciated.

    Thank you,
    Dave.

    #2
    Hello d3whiteley,

    To access those values you would need to subscribe to the accounts OrderUpdate event and then watch for orders with those names. Once the order is observed you could set your variables so your other drawing logic can use the prices.

    Comment


      #3
      Thank you for your reply Jesse, but this is not what I'm looking for. I would like to know what the currently SELECTED strategy stop and target values are BEFORE the order is placed.

      Comment


        #4
        Hello d3whiteley,

        There is no way to know that, you would have to wait for the orders to be submitted. They don't have an initial price in the template, the template uses offset values which have to be calculated once the entry order has filled. The template is not something you can read in code to extract values. After they are placed you can see their prices.

        Comment


          #5
          Thank you. I appreciate you getting back so quickly. I can stop looking and do it another way.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X