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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
77 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
40 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment