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 cmoran13, Yesterday, 01:02 PM
        0 responses
        28 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        18 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        160 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        95 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        148 views
        2 likes
        Last Post CaptainJack  
        Working...
        X