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 johnnymustard, Today, 09:52 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 09:52 AM | ||
Started by SnailHorn, 03-27-2024, 09:54 AM
|
4 responses
17 views
0 likes
|
Last Post
by SnailHorn
Today, 09:19 AM
|
||
Started by ninza33, Today, 07:16 AM
|
3 responses
18 views
0 likes
|
Last Post
by ninza33
Today, 09:01 AM
|
||
Started by foxtrott21, Today, 08:27 AM
|
0 responses
4 views
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
3 views
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
Comment