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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    48 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X