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

Issue with size in atm

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

    Issue with size in atm

    Hi,
    I am having an issue with the atm. When I move the stop or the target manually by hand the size resets back to size 1.
    I have an indicator that detects new orders and it adds one contract to the target or stop and here's how I do it.

    Code:
    foreach (Order order in Account.Orders) {
    //if its Stop1 or Target1
    order.Quantity += 1;
    }
    How can I keep size 4 when moving the target or the stop manually?
    Attached Files

    #2
    Hello PWillard,

    This may be that the original order settings from the template is being used when doing the modification. You could confirm that by using a greater than 1 quantity in the template and then retesting the steps to see this. The way you are modifying the order is also unusual, to correctly change an order you could use the Change method


    I would suggest trying to do the change of quantity using Change() and see if the same result happens when manually modifying the order.

    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by algospoke, Today, 06:40 PM
    0 responses
    4 views
    0 likes
    Last Post algospoke  
    Started by maybeimnotrader, Today, 05:46 PM
    0 responses
    7 views
    0 likes
    Last Post maybeimnotrader  
    Started by quantismo, Today, 05:13 PM
    0 responses
    6 views
    0 likes
    Last Post quantismo  
    Started by AttiM, 02-14-2024, 05:20 PM
    8 responses
    168 views
    0 likes
    Last Post jeronymite  
    Started by cre8able, Today, 04:22 PM
    0 responses
    9 views
    0 likes
    Last Post cre8able  
    Working...
    X