Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Dynamically set SetStopLoss
Collapse
X
-
Dynamically set SetStopLoss
I am coding simple strategy that generates entry position upon specified condition(SMA crossover), when the profit target increases by 10 ticks I would like to set stop loss which is five ticks higher than generated entry position. I am not sure how and where assign SetStopLoss property. Normally I would define it in OnBarUpdate section. My question actually is if somebody can provide me with sample code how dynamically set this value with conditions described above? -
Hello choinski,
Welcome to the forum and I am happy to assist you.
Please refer to this sample reference code which demonstrates how to modify stop and profit targets http://ninjatrader.com/support/forum...ead.php?t=3222
Please let me know if I can assist you any further.JoydeepNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,602 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
8 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
4 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
12 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment