My code already updates the account size when a position is closed, but (I think) it doesn't take into consideration when the SL is trigger. Do you how can I do that?
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
How to update account size when the stoploss is triggered?
Collapse
X
-
How to update account size when the stoploss is triggered?
Hello (again),
My code already updates the account size when a position is closed, but (I think) it doesn't take into consideration when the SL is trigger. Do you how can I do that?
Tags: None
-
Hello havy.tom24,
The Account.CashValue will automatically update for real-time orders placed to that account when the Account.PositionUpdate event runs.
If you are wanting to detect when a stop loss fills this can be detected in OnOrderUpdate.
Chelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RookieTrader, Today, 09:37 AM
|
1 response
10 views
0 likes
|
Last Post Today, 09:43 AM | ||
Started by alifarahani, Today, 09:40 AM
|
0 responses
5 views
0 likes
|
Last Post
by alifarahani
Today, 09:40 AM
|
||
Started by Gerik, Today, 09:40 AM
|
1 response
5 views
0 likes
|
Last Post Today, 09:50 AM | ||
Started by KennyK, 05-29-2017, 02:02 AM
|
3 responses
1,284 views
0 likes
|
Last Post Today, 09:35 AM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
11 responses
185 views
0 likes
|
Last Post Today, 09:28 AM |
Comment