Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to stop a strategy once day profit target is reached?
Collapse
X
-
How to stop a strategy once day profit target is reached?
How do I set a day profit target in strat wizard so that once the target is reached and there are no open positions then stop trading but if any open positions are still open then continue to trade until all positions are closed?Tags: None
-
relogical, for this you would need to work in our NinjaScript editor outside of the wizard interface.
For a sample dealing with the topics you raised, please check into this link - http://www.ninjatrader.com/support/f...ead.php?t=4084BertrandNinjaTrader Customer Service
-
Can someone explain how to stop the strategy once certain profit is been reached.
Say I have a Strategy to go long it started at 10:00 am it has processed three trades and made $500 now say that is all I need to close the day. How to tell the strategy to trade until 500.
Comment
-
Hi Nettony,
Thank you for posting and welcome to the forum!
The first step you want in your code is to reset the daily trade profitability. You can then test your strategy if you have reached 500$ of profit and then Disable();.
Here is a reference sample on how to stop a strategy based on profitability and how to reset your trade profitability.
http://www.ninjatrader.com/support/f...ad.php?t=19289
Let me know if I can be of further assistance.Cal H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by GussJ, 03-04-2020, 03:11 PM
|
15 responses
3,271 views
0 likes
|
Last Post Today, 03:15 PM | ||
Started by Tim-c, Today, 02:10 PM
|
1 response
8 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
2 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
4 responses
51 views
0 likes
|
Last Post
by chbruno
Today, 02:38 PM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
10 responses
403 views
1 like
|
Last Post
by beobast
Today, 02:35 PM
|
Comment