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 Karado58, 11-26-2012, 02:57 PM
|
8 responses
14,826 views
0 likes
|
Last Post Today, 09:09 AM | ||
Started by Option Whisperer, Today, 09:05 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 09:05 AM | ||
Started by cre8able, Yesterday, 01:16 PM
|
3 responses
11 views
0 likes
|
Last Post
by cre8able
Today, 08:28 AM
|
||
Started by Harry, 05-02-2018, 01:54 PM
|
10 responses
3,204 views
0 likes
|
Last Post
by tharton3
Today, 08:52 AM
|
||
Started by ChartTourist, Today, 08:22 AM
|
0 responses
6 views
0 likes
|
Last Post
by ChartTourist
Today, 08:22 AM
|
Comment