Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Percent targets

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

    Percent targets

    Hi

    Can anyone please provide me a simple strategy builder code line for NT8 that executes this on a 30 minute chart frame:

    Profit target

    Currently have 200 shares of a xyz long

    want to execute 100 shares at 10% increase in price.

    want to execute 100 shares at 20% increase in price.

    This is not achievable thru SetProfitTarget since it only exits the entire position. I need to scale out without creating 2 different entry signals.

    I want to have one entry signal and 2-3 profit targets.

    thanks in advance

    #2
    Hello Deanmadar,

    Thank you for your note.

    You could see the following example on scaling out of a position,


    What you could do is enter two long positions for the same product, each with a unique name, 100 shares each, and then use setprofittaget for each. Under this approach you would set EntryHandling = EntryHandling.UniqueEntries; and EntriesPerDirection to 1.

    This will allow, EnterLong("LongA") and EnterLong("LongB") to be executed.

    Then you can use,
    Code:
    SetProfitTarget("LongA", CalculationMode.Ticks, 10)
    SetProfitTarget("LongB", CalculationMode.Ticks, 20)
    Please see,



    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X