Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
AdvancedRiskReward tool: How to use, specify risk
Collapse
X
-
AdvancedRiskReward tool: How to use, specify risk
I am very interested in the functionality this tool will provide. I don't understand how it can calcuate the number of contracts without me specifing $ I am willing to risk. In properties, Contracts seems to be dynamic, and RiskPercent & Account Size are grayed out. Can anyone tell me why they are grayed out and how I can input the $$$ I am willing to risk on entry. Is there any other instructions / tutorial / video related to onboard some in using this tool?Tags: None
-
Hello HFJ555,
Welcome to the NinjaTrader forums!
To confirm, you are referring to the Advanced Risk Reward Indicator originally coded by bassam for NinjaTrader 7 and ported to NinjaTrader 8 by NinjaTrader_Jim?
This is a port of the NinjaTrader 7 Advanced Reward Risk Indicator originally created by bassam. Please direct any requests and inquiries about usage to the original author. This indicator helps you define your entry, stop and target (1 or 3) visually on the chart with the help of horizontal lines, calculates your potential P/L […]
This indicator helps you define your entry, stop and target (1 or 3) visually on the chart with the help of horizontal lines, calculates your potential P/L ,unrealized P/L,Risk/Reward ratio and contracts sizing per account size. Once started click on the chart 3 times there where you think your values will be appropriate , then […]
The 'RiskPercent' property is set in the Indicators window controls how much you are willing to risk.
The 'Contracts' is dynamic and calculated by the script.
if(PotentialLoss < 1)
Contracts = 1;
else
Contracts = (int)( ((AccountSize * RiskPercent)/100) /PotentialProfit);
if(Contracts < 1)
Contracts = 1;
The 'RiskPercent' and 'AccountSize' are grayed out unless Interactive is set to 'No'.
bool ContNewValue = (value == Interactive.Yes? false:true );
PropertyDescriptor ContDescriptor = TypeDescriptor.GetProperties(this.GetType())["Contracts"];
PropertyDescriptor AccountDescriptor = TypeDescriptor.GetProperties(this.GetType())["AccountSize"];
PropertyDescriptor RiskDescriptor = TypeDescriptor.GetProperties(this.GetType())["RiskPercent"];
ReadOnlyAttribute ContAttrib = (ReadOnlyAttribute)ContDescriptor.Attributes[typeof(ReadOnlyAttribute)];
ReadOnlyAttribute AccountAttrib = (ReadOnlyAttribute)AccountDescriptor.Attributes[typeof(ReadOnlyAttribute)];
ReadOnlyAttribute RiskAttrib = (ReadOnlyAttribute)RiskDescriptor.Attributes[typeof(ReadOnlyAttribute)];
FieldInfo ContisReadOnly = ContAttrib.GetType().GetField("isReadOnly", BindingFlags.NonPublic | BindingFlags.Instance);
FieldInfo AccountisReadOnly = AccountAttrib.GetType().GetField("isReadOnly", BindingFlags.NonPublic | BindingFlags.Instance);
FieldInfo RiskisReadOnly = RiskAttrib.GetType().GetField("isReadOnly", BindingFlags.NonPublic | BindingFlags.Instance);
ContisReadOnly.SetValue(ContAttrib, ContNewValue);
AccountisReadOnly.SetValue(AccountAttrib, !ContNewValue);
RiskisReadOnly.SetValue(RiskAttrib, !ContNewValue);
NinjaTrader does not create tutorial videos for specific indicators.
However, this thread will remain open if any community member knows of a community created video on this indicator and would like to share.Chelsea B.NinjaTrader Customer Service
-
Thank you Chelsea for your quick and informative reply!
Yes, that is the indicator I am asking about.
Ah! I understand from your reply the "Interactive" field has to set to No to allow me to change the Risk and Account fields. I didn't catch that. Perfect.
Steve
Comment
-
I am now familiar with the tool and been using it for about a week. However, today I find the tool is not automatically updating the NT quantity field as it was.
Q1: What could be preventing the tool from automatically updating the NT quantity so NT is ready to apply the calculated qty to my order?
I tried reloading the application and remove and reloading tool.... turning Interactive off and On.....
Q2: When in Interactive mode, next to price is a is a blue number (current price?) and a small number in a box. What does the number in the box represent (ticks from position line?) Any idea what the intended application of this number is?
Cheers,
Steve
Comment
-
Hello Steve,
"What could be preventing the tool from automatically updating the NT quantity so NT is ready to apply the calculated qty to my order?"
I don't see any code in the script to modify the quantity field in chart trader.
You will want to ask this question of the original author Bassam what they had in mind for the script.
"When in Interactive mode, next to price is a is a blue number (current price?) and a small number in a box. What does the number in the box represent (ticks from position line?)"
The code rendering that text is on lines 1371 through 1375:
Code:string [B]InteractivePLTxt[/B] =" "+([B]PL[/B]*Instrument.MasterInstrument.[B]PointValue[/B] *((CalcBasedOnUser)? [B]userscontracts[/B]:[B]1[/B])).ToString("N0")+" "; DrawString(InteractivePLTxt, textFont, "InteractivePLColor", ChartPanel.X +LastBarX+PLShift, CloseY - 9);
This might be a profit or loss expected amount. I would recommend asking Bassam the author of the script what this is representing.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment