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

Comment