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
CloseOnProfitTarget
Collapse
X
-
Hello,
While we are unable to code for you, our NinjaTrader Ecosystem does support quite a few NinjaScript Consultants who would be happy to further assist you. You can view NinjaTrader Ecosystem's supported NinjaScript consultants at the following link:
You can locate the contact information for the partner on their direct webpage for any additional questions you may have. Since these partners are third party add-ons for NinjaTrader all pricing information will need to be obtained through the partner.
Please let me know if you have any additional questions.
Have a great day!
-
I do not know how to do that. I do not know how to code... that's why I am asking for help.
Can you tweak the code for me?
Leave a comment:
-
Hello JamesDuke, and thank you for your question. Your approach is definitely feasible. I am going to include an emphasized code excerpt and a relevant helpguide page which I believe will aid you in putting together this strategy.
Code:[FONT=Courier New] if (!closing) { profitLoss = pos.GetProfitLoss(Close[0], 0); btnActivate.Text = (drawdown + profitLoss).ToString(); textChanged = true; [B]// JDP Mon Sep 5 11:18:59 MDT 2016 // I believe if you change -drawDown to a static value // to compare profitLoss to, this strategy will work // the way you would like [/B] [B]if (profitLoss < -drawdown)[/B] { closing = true; pos.Close(); Log("Max drawdown of " + drawdown + " reached and canceled all orders from " + pos.Instrument, LogLevel.Alert); } }[/FONT]
Please let us know if there are any other ways we can help.
Leave a comment:
-
CloseOnProfitTarget
Wondering if it is possible to take the code from the CloseOnDrawdown Indicator found in the Ninja 7 downloads and reverse engineer it to close on ProfitTarget instead.
So using the same logic to shut down a strategy once X profit objective is realized for the day.
Thanks,
DukeAttached FilesTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ender_wiggum, Today, 09:50 AM
|
1 response
5 views
0 likes
|
Last Post Today, 10:10 AM | ||
Started by rajendrasubedi2023, Today, 09:50 AM
|
1 response
10 views
0 likes
|
Last Post Today, 10:05 AM | ||
Started by geotrades1, Today, 10:02 AM
|
0 responses
4 views
0 likes
|
Last Post
by geotrades1
Today, 10:02 AM
|
||
Started by bmartz, Today, 09:30 AM
|
1 response
8 views
0 likes
|
Last Post Today, 09:48 AM | ||
Started by geddyisodin, Today, 05:20 AM
|
3 responses
24 views
0 likes
|
Last Post Today, 09:36 AM |
Leave a comment: