Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
take a daily profit automatically
Collapse
X
-
Hello 270027,
Yes, this is possible.
Below is a link to an example that is a daily loss limit, but the same concept could be used for a daily profit limit.
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
-
Hello and thank you very much.
I tried all three.There is only one that can be made changes with the strategy builder . Would you be kind enough to make the other two accessible with the strategy builder? compared to the other they stop in the candle and the one accessible is at the end of the candle and when working on candles of 5 minutes it can be long and far exceed the limit.
Thanks again
Comment
-
hello, could you modify for this it stops in the current candle please? Thank youOriginally posted by NinjaTrader_ChelseaB View PostHello 270027,
Unfortunately, no. Only scripts created with the Strategy Builder that have not been unlocked can be opened in the Strategy Builder.
The custom logic in these scripts means they cannot be created with the Strategy Builder.
Comment
-
Chelsea B.NinjaTrader Customer Service
Comment
-
Hello, I tried to put the profit taking in your example which seemed easy to me. I put in attached file the modified reference file, can you tell me what is wrong? Thank youOriginally posted by NinjaTrader_ChelseaB View PostHello 270027,
Yes, this is possible.
Below is a link to an example that is a daily loss limit, but the same concept could be used for a daily profit limit.
https://ninjatrader.com/support/foru...ples#post93881Last edited by 270027; 12-25-2021, 03:54 AM.
Comment
-
Hello 270027,
With:
(DailyPNL > DailyLoss)
&& (DailyPNL < DailyTP)
You are trying to trigger an action when the DailyPNL is greater than the DailyLoss and also less than the DailyTP as well correct?
Print the time, the DailyPNL, the DailyLoss, and the DailyTP to the output window. Include the output saved to a text file with your reply.
Chelsea B.NinjaTrader Customer Service
Comment
-
hello,Originally posted by NinjaTrader_ChelseaB View PostHello 270027,
With:
(DailyPNL > DailyLoss)
&& (DailyPNL < DailyTP)
You are trying to trigger an action when the DailyPNL is greater than the DailyLoss and also less than the DailyTP as well correct?
Print the time, the DailyPNL, the DailyLoss, and the DailyTP to the output window. Include the output saved to a text file with your reply.
https://ninjatrader.com/support/foru...121#post791121
can we print with the strategy analyzer? when I do, the information scrolls through the window of the ninja script and fades immediately and I don't have time to save it in text format. Is there a way to get it back?
Thank you for your help.
Comment
-
Hello 270027,
Yes, you can call Print() from indicators and strategies at any time. You can also call Code.Output.Process() in addons at any time. Think of this as Console.WriteLine() but for NinjaScripts.
You can right-click the output window and select save as to save the output to a text file. Click upload attachments to attach a text file to your post.
You could copy and paste the text back in your post instead, but this makes for long posts that obscure your actual messages. The choice is up to you.
The output is how to diagnose issues. Without looking at how the code is processing, there isn't the ability to understand why the mechanism is working as it is.
My advice would be to take the time to learn C#, how to get output, and how to use the NinjaTrader Platform before tackling any complex project. C# is a big world with a lot of possibilities and a lot to learn. Don't rush through things and actually set aside some time to learn about what you are doing. In the long run, what you create will have a solid foundation.Last edited by NinjaTrader_ChelseaB; 12-28-2021, 01:05 PM.Chelsea B.NinjaTrader Customer Service
Comment
-
hello, I think I made myself misunderstood. since the strategy analysis tool can we record? I put you a link attached what happens when I press the runOriginally posted by NinjaTrader_ChelseaB View PostHello 270027,
Yes, you can call Print() from indicators and strategies at any time. You can also call Code.Output.Process() in addons at any time. Think of this as Console.WriteLine() but for NinjaScripts.
As noted in the forum post on using prints to understand behavior linked in post# , you can right-click the output window and select save as to save the output to a text file. Click upload attachments to attach a text file to your post.
You could copy and paste the text back in your post instead, but this makes for long posts that obscure your actual messages. The choice is up to you.
The output is how to diagnose issues. Without looking at how the code is processing, there isn't the ability to understand why the mechanism is working as it is.
My advice would be to take the time to learn C#, how to get output, and how to use the NinjaTrader Platform before tackling any complex project. C# is a big world with a lot of possibilities and a lot to learn. Don't rush through things and actually set aside some time to learn about what you are doing. In the long run, what you create will have a solid foundation.
Thank's
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
139 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|
Comment