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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X