Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Profit Target Closed After Certain Amount
Collapse
X
-
Profit Target Closed After Certain Amount
Please, is it sufficient to apply this trade for Ninjatrader to work (codewise).Example Trades are placed to execute immediately. The EA closes all trades for a certain level of Profit Target for the day. No indicator concluded in the trade.Thank you..Tags: None
-
Hello.
Thanks for the post.
Your question sounds like you would like to stop trading after a certain total profit has been reached.
The reference sample given below demonstrates that will stop itself if there are three consecutive losing trades. You can use the same concept to check for your profit and then stop trading for the rest of the day.
Ex:
You may also use the Account class in your strategy to get information on the account the strategy is running on:Code:if(SystemPerformance.AllTrades.TradesPerformance.GrossProfit > X) { //Do something }
Please let us know if you have any questions.
-
In the attached example above (SampleTradeObjects.cs) you suggested,Uses Adx , My Question is , can similar code work and achieve the result with out Indicators. Thank youOriginally posted by NinjaTrader_ChrisL View PostHello.
Thanks for the post.
Your question sounds like you would like to stop trading after a certain total profit has been reached.
The reference sample given below demonstrates that will stop itself if there are three consecutive losing trades. You can use the same concept to check for your profit and then stop trading for the rest of the day.
Ex:
You may also use the Account class in your strategy to get information on the account the strategy is running on:Code:if(SystemPerformance.AllTrades.TradesPerformance.GrossProfit > X) { //Do something }
Please let us know if you have any questions.
Comment
-
Hello Emma1,
thanks for the reply.
The indicators used in strategies are just a way to assist with calculations. If you were to use no indicators, you could write the code for whatever calculations the indicator is doing within the script. You can use indicators in a script so you do not have to keep writing the same code and everything can be modularized.
Please let me know if I may be of any further assistance.
Comment
-
-
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment