Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit Strategy after certain number of ticks obtained

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

    Exit Strategy after certain number of ticks obtained

    Hello all,
    I would like to program a Strategy so it makes at minimum of say 20 ticks a day.
    Say that my StopLoss is 10 ticks and my ProfitTarget is 20 ticks.

    I could see 3 main scenarios:

    1. 1st trade wins 20 ticks and strategy stops running ( gets disabled? )
    2. 1st trade looses 10 ticks. 2nd trade wins 20 ticks. 3rd trade wins 20 ticks - I have a profit of 30 ticks and strategy stops running
    3. Likewise I would like to limit my losses. Eg in case I have 3 consecutive losses of say 30 ticks total, the strategy stops running.

    So I need a variable to cummulate my losses and my profit and when it reaches certain amount I want strategy to get disabled.

    Any thoughts?

    M

    #2
    mal1954, you can check into this example - http://www.ninjatrader.com/support/f...ead.php?t=4084

    It deals with using the Performance class available in our NinjaScript to halt a strategy once certain PnL levels for the session are hit.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    49 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X