Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two conditions to exit a position

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

    Two conditions to exit a position

    Hi,
    Im using strategy analyzer to set up my strategy and really dont know how to put my condition there.

    The strategy is to enter a long position when one stock is 10% bellow the previous day close.
    And, here is the problem, exit this long position when achieve 10% profit OR 20 trade sessios after enter initial position.

    need help
    txs

    #2
    Hello GroundBurst,

    Welcome to the NinjaTrader Support Forums!

    Using the Strategy Wizard, you may setup a Profit Target to 10 percent using the Stops and Targets Screen.


    The only trouble I see is that determining 20 Trade Sessions. Which is possible but you would have do some custom coding for this.

    If you would like to custom code this you may want to use Bars.FirstBarOfSession and use a counter to count how many sessions have passed since you have entered the order.

    Here is a link to our Help Guide that goes over Bars.FirstBarOfSession that you may view.


    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    10 responses
    36 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by DayTradingDEMON, Today, 09:28 AM
    4 responses
    24 views
    0 likes
    Last Post DayTradingDEMON  
    Started by geddyisodin, Yesterday, 05:20 AM
    9 responses
    50 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by George21, Today, 10:07 AM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by Stanfillirenfro, Today, 07:23 AM
    9 responses
    24 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X