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?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Setting profit targets in a multi-instrument strategy
Collapse
X
-
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?Tags: None
-
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
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
646 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
367 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment