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
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:
Code:if(SystemPerformance.AllTrades.TradesPerformance.GrossProfit > X) { //Do something }
Please let us know if you have any questions.Chris L.NinjaTrader Customer Service
-
Originally 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:
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.Chris L.NinjaTrader Customer Service
Comment
-
-
Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by CortexZenUSA, Today, 12:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:53 AM
|
||
Started by CortexZenUSA, Today, 12:46 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:46 AM
|
||
Started by usazencortex, Today, 12:43 AM
|
0 responses
5 views
0 likes
|
Last Post
by usazencortex
Today, 12:43 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,265 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
12 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment