Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exiting entire position

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

    Exiting entire position

    If my strategy calls for numerous "buys" and then calls for closing the entire position because of a certain indicator event, how can you program it to know how many lots you have, and to close all of them at once?

    ExitLong("", "Exit Long on 30 Cross Above 5")

    only exits the default quantity.

    #2
    No, if you do not specify a quantity it will exit your whole position to bring you to a flat position. The code you specified uses the ExitLong(string signalName, string fromEntrySignal) syntax. This means you will only be exiting whatever entry position you had labeled "Exit Long on 30 Cross Above 5".


    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mmenigma, Today, 02:22 PM
    0 responses
    1 view
    0 likes
    Last Post mmenigma  
    Started by frankthearm, Today, 09:08 AM
    9 responses
    34 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by NRITV, Today, 01:15 PM
    2 responses
    9 views
    0 likes
    Last Post NRITV
    by NRITV
     
    Started by maybeimnotrader, Yesterday, 05:46 PM
    5 responses
    26 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by quantismo, Yesterday, 05:13 PM
    2 responses
    20 views
    0 likes
    Last Post quantismo  
    Working...
    X