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 PhillT, Today, 02:16 PM
|
2 responses
6 views
0 likes
|
Last Post
by PhillT
Today, 02:33 PM
|
||
Started by Kaledus, Today, 01:29 PM
|
3 responses
10 views
0 likes
|
Last Post Today, 02:24 PM | ||
Started by frankthearm, Yesterday, 09:08 AM
|
14 responses
47 views
0 likes
|
Last Post Today, 02:19 PM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
2 responses
14 views
0 likes
|
Last Post Today, 02:05 PM | ||
Started by PaulMohn, Today, 12:36 PM
|
2 responses
17 views
0 likes
|
Last Post
by PaulMohn
Today, 01:48 PM
|
Comment