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 halgo_boulder, Today, 08:44 AM
    0 responses
    1 view
    0 likes
    Last Post halgo_boulder  
    Started by drewski1980, Today, 08:24 AM
    0 responses
    3 views
    0 likes
    Last Post drewski1980  
    Started by rdtdale, Yesterday, 01:02 PM
    2 responses
    17 views
    0 likes
    Last Post rdtdale
    by rdtdale
     
    Started by TradeSaber, Today, 07:18 AM
    0 responses
    7 views
    0 likes
    Last Post TradeSaber  
    Started by PaulMohn, Today, 05:00 AM
    0 responses
    10 views
    0 likes
    Last Post PaulMohn  
    Working...
    X