I'm trying to pull the normal distribution value of a zscore but I am not able to pull in standard C# Normal Distribution and I do not see NormDist in the Math class. Is there a way to do this in NinjaScript?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Normal Distribution function
Collapse
X
-
I believe NormalDistribution is part of the .NET Framework 4.8's charting class not the math class.
See for instance: https://learn.microsoft.com/en-us/do...ramework-4.8.1
What is it you're trying to do?
-
Hey Bruce, I'm trying to calculate the one and two sided percentile of a Z-Score. In excel this is as simple as:Originally posted by QuantKey_Bruce View PostI believe NormalDistribution is part of the .NET Framework 4.8's charting class not the math class.
See for instance: https://learn.microsoft.com/en-us/do...ramework-4.8.1
What is it you're trying to do?
One Sided =NORM.S.DIST(X,FALSE)
Two Sided =NORM.S.DIST(X,TRUE)
I thought there would surely be a normal distribution function in NinjaScript but did not find one and can not figure out how to pull in a normal distribution method into NT using C#
Last edited by ChrisR; 05-06-2023, 07:28 AM.
Comment
-
-
Or you may want to do it like this, which is more written out even if less efficient: https://bytes.com/topic/c-sharp/answ...l-distribution
Comment
-
Hello ChrisR,
Thanks for your post.
I am happy to hear you found a solution.
NinjaTrader does not have a NormalDistribution method or property available to use.
This would require custom logic to accomplish and the examples QuantKey_Bruce shared demonstrate how this could be done as you have noted.
<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment