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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
59 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
143 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
161 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
97 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
276 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment