When the risk reward tool's display unit is in "currency mod" is its possible to count the risk with the order qty or it is a fix qty?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Risk-Reward tool question
Collapse
X
-
Hello,
The Risk/Reward tool is set to a fixed quantity of 1 for non-forex instruments, and uses the Account.Accounts[0].ForexLotSize property to set quantities for forex instruments.
That being said, it should not be too difficult to modify this Drawing Tool to use variable quantities to determine risk in currency terms. If you are familiar with NinjaScript, take a look at line 113 of @RiskReward.cs as a starting point.Dave I.NinjaTrader Product Management
-
One way that you might go about this is to expose a public int property which can be used to set the quantity explicitly in the Drawing Objects properties window, then use that property to set a private variable which you can use to multiply the result that is already being calculated in the script.Dave I.NinjaTrader Product Management
Comment
-
Hello,
Thank you for the reply.
This item would require programming in order to complete as this would not just be a single line change or an item that could be copied and pasted simply.
Essentially to allow the existing tool to do what you have asked the following item would need to occur:- You would need to duplicate or make a copy of the existing tool.
- Edit the code so that the duplicate is no longer a duplicate name but has a unique name and test that the tool shows up in the drawing tools menu correctly and works as the other tool does.
- You would need to add code for a public property and test that has worked to have a input for a value.
- Finally you would need to locate the logic in the region after line 113 and change it to use the public property as needed.
There are existing samples of the input, and of the drawing tool so that would assist in your learning if you feel you would like to learn NinjaScript to accomplish this, otherwise this would be an item you would likely need to have created for you if you did not want to code it yourself.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by volIQ, 03-27-2024, 04:28 PM
|
3 responses
21 views
0 likes
|
Last Post
by RJay
Today, 05:41 AM
|
||
Started by Nickgiaco, 02-26-2024, 10:23 AM
|
2 responses
72 views
0 likes
|
Last Post Today, 05:12 AM | ||
Started by Johndc, Today, 04:39 AM
|
0 responses
4 views
0 likes
|
Last Post
by Johndc
Today, 04:39 AM
|
||
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
9 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
13 views
0 likes
|
Last Post Today, 02:00 AM |
Comment