Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
SetStopLoss()
Collapse
X
-
SetStopLoss()
Hi, I'm writing a strategy that enters a long position at a certain price with an initial stop loss set at 10 ticks (using SetStopLoss() in OnStateChange section). Once I reach an initial profit level, I want to adjust my stop loss upwards. This seems simple to do but I could not find an example where my stop can be adjusted from its initial setting. Any assistance is greatly appreciated! thanksTags: None
-
Hello pman777,
Thank you for your note.
You could see the following two samples.
The following sample will move a stop to breakeven after 5 ticks have been reached,
The last sample at the following link will adjust the stop up as profit grows,
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by lorem, Yesterday, 09:18 AM
|
5 responses
16 views
0 likes
|
Last Post Today, 12:29 PM | ||
Started by Spiderbird, Today, 12:15 PM
|
0 responses
5 views
0 likes
|
Last Post
by Spiderbird
Today, 12:15 PM
|
||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
12 responses
42 views
0 likes
|
Last Post Today, 12:09 PM | ||
Started by FrazMann, Today, 11:21 AM
|
0 responses
6 views
0 likes
|
Last Post
by FrazMann
Today, 11:21 AM
|
||
Started by geddyisodin, Yesterday, 05:20 AM
|
8 responses
52 views
0 likes
|
Last Post Today, 10:45 AM |
Comment