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
Where's the StopLoss
Collapse
X
-
Hello Bluebeep, Thanks for your post.
You would need to calculate this with your code. When you say "set a stop loss at x ticks" that means to set the stop x ticks away from your average entry, whatever that price may be. Set up a int variable at the class level that represents the tick value being used, then if you are long, the price the stop will be at will be written as such: var stopprice = Close[0]-TickSize*<number of ticks for the stop>.
Best regards.Chris L.NinjaTrader Customer Service
-
That makes sense I'll use it. Thanks. However, as a possibility this might help for the future (maybe a feature request, and maybe to make things a bit easier) - there's a line on my screen where the stop-loss is. Give me a hook so I can get it's value. For example: Your.Cool.Stoploss[0]. Would be amazing to grab Your.Cool.Stoploss[1] no?
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by alifarahani, Today, 09:40 AM
|
6 responses
36 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
17 views
0 likes
|
Last Post Today, 03:03 PM | ||
Started by Kaledus, Today, 01:29 PM
|
5 responses
14 views
0 likes
|
Last Post Today, 02:56 PM | ||
Started by Waxavi, Today, 02:00 AM
|
1 response
12 views
0 likes
|
Last Post Today, 02:53 PM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
3 responses
17 views
0 likes
|
Last Post Today, 02:41 PM |
Comment