Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting profit targets in a multi-instrument strategy

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

    Setting profit targets in a multi-instrument strategy

    I understand how to apply unique signal names in the fromEntrySignal parameter to set profit targets for different signals in a multi-instrument strategy, but I'm using the same signal logic repeatedly in different time windows for each of two instruments with two distinct strategies, and each entry signal has a unique name. e.g. Strategy1Long1, Stategy1Long2, Strategy1Short1, Strategy1Short2, Strategy2Long1 . . . Strategy2Short2 . . .etc.

    Suppose I want to apply the same ProfitTarget to ALL Strategy1 entries. Do I need to repeat the SetProfitTarget code statement in the Initialize() block for each unique entry name, or is there a more elegant way of doing this?

    #2
    tradetree, I would not be aware of another way, you would need to tie the SetProfitTargets then individually to each Strategy1 / Strategy 2 entry.

    Comment


      #3
      Thanks Bertrand, that's how I'll do it then.

      I just want to say I've learned a lot from your posts. Without any formal instruction in programming, but thanks to the all the ninjascript pointers I've absorbed from you and Josh over the years, I first learned how to think like a strategy robot, and now finally I'm getting to the point where my strategybots are beginning to think like me (i.e. a trader)!

      I also want to say that NT7 is awesome and the new ninjascript Help materials are superb.

      Comment


        #4
        Thanks for your kind words raintree, much appreciated - I'll fwd them to Josh as well.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        649 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        576 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X