Thanks
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
Exit Strategy after realized pnl is achieved
Collapse
X
-
Exit Strategy after realized pnl is achieved
Hi,I would like to close or stop my strategy when I achieved a 500 dollars profit daily....is there a way to program it in the strategy builder (nt8)?
ThanksTags: None
-
Hello Italianforex,
The Strategy Builder does have the Strategy > Realized PnL available, however this is not reset daily. This contains the Realized PnL for all orders ever placed by that instance of the strategy.
You could write in the entry conditions the Realized PnL must be below 500, and then each day remove and re-add the instance of the script.
If you wanted to reset on a new session, the PnL would need to be tracked each day and accumulated to a variable that is reset on the new session (or at the time coded in the script).
This would require the script to be unlocked.
Below is a link to an example.
Hello, I've updated the DailyLossLimit and DailyLosLimitMultiTrade examples that were posted on the forum for NinjaTrader 7 for NinjaTrader 8. These are often requested and I felt they are good examples to have for NT8. DailyLossLimitExample_NT7 - http://ninjatrader.com/support/forum...241#post451241 (http://ninjatraderChelsea B.NinjaTrader Customer Service
-
Originally posted by NinjaTrader_ChelseaB View PostHello Italianforex,
The Strategy Builder does have the Strategy > Realized PnL available, however this is not reset daily. This contains the Realized PnL for all orders ever placed by that instance of the strategy.
You could write in the entry conditions the Realized PnL must be below 500, and then each day remove and re-add the instance of the script.
Does it work in the backtesting?
Thanks
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kujista, Today, 05:44 AM
|
0 responses
6 views
0 likes
|
Last Post
by kujista
Today, 05:44 AM
|
||
Started by ZenCortexCLICK, Today, 04:58 AM
|
0 responses
9 views
0 likes
|
Last Post Today, 04:58 AM | ||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
172 responses
2,281 views
0 likes
|
Last Post
by sidlercom80
Today, 04:40 AM
|
||
Started by Irukandji, Yesterday, 02:53 AM
|
2 responses
18 views
0 likes
|
Last Post
by Irukandji
Today, 03:55 AM
|
||
Started by adeelshahzad, Today, 03:54 AM
|
0 responses
11 views
0 likes
|
Last Post
by adeelshahzad
Today, 03:54 AM
|
Comment