Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetAtmStrategyStopPrice or get target needed vs GetAtmStrategyStopTargetOrderStatus

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

    GetAtmStrategyStopPrice or get target needed vs GetAtmStrategyStopTargetOrderStatus

    GetAtmStrategyStopTargetOrderStatus seems pointless and does not give what I am looking for.


    protected override void OnBarUpdate()
    {
    string[,] orders = GetAtmStrategyStopTargetOrderStatus("Target1", "idValue");
    // Check length to ensure that returned array holds order information
    if (orders.Length > 0)
    {
    for (int i = 0; i < orders.GetLength(0); i++)
    {
    Print("Average fill price is " + orders[i, 0].ToString());
    Print("Filled amount is " + orders[i, 1].ToString());
    Print("Current state is " + orders[i, 2].ToString());
    }
    }
    }​

    It seems to me if the target is filled, why would you look for it

    Other than recording it myself which I am in process of coding.

    I would like to know the current ATM stop and target especially since I can move it manually.

    #2
    Hello BartMan,

    Thank you for your post.

    The use case for using an ATM strategy inside of a NinjaScript strategy is to use NinjaScript to programmatically monitor and generate the entry signal, then manually manage the open position, including stops and targets. What is your reasoning for accessing the stop and target price programmatically? What do you plan to do with that information within the script? Having a better explanation might help me to understand and suggest how to get what you are looking for.

    You could access information outside of orders generated by a NinjaScript strategy, such as the stop and target information since that is generated by the ATM strategy, by using the Account class:You could then set up OnOrderUpdate to check for orders with names such as "Stop1" or "Target1" and check their prices.Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    559 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    546 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X