NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 11-05-2008, 09:37 AM   #1
The Kid
Junior Member
 
Join Date: Nov 2008
Posts: 15
Thanks: 0
Thanked 0 times in 0 posts
Default NinjaScript Math Functions

Hello,
A common requirement of my indicators is taking square root and raising to the power n.
What are people using to make math functions like this work in NinjaScript.

I've seen the System.Math.sqrt() call and the other System.Math calls. Does anyone use a reliable library with overloaded operators to make the syntax less painfull.

Any other way to make the syntax less painfull like perhaps a "with" statement?
The Kid is offline  
Reply With Quote
Old 11-05-2008, 10:32 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Hi The Kid,

One of our NinjaScript trainees will respond to you later today. Thank you for your patience.
NinjaTrader_Josh is offline  
Reply With Quote
Old 11-05-2008, 10:54 AM   #3
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

The Kid,

You can just do Math.Sqrt(). This is general C# programming and it may be best to direct your search over to the MSDN docs for more information on Math functions.
NinjaTrader_Josh is offline  
Reply With Quote
Old 11-05-2008, 12:25 PM   #4
RJay
Senior Member
 
Join Date: May 2008
Location: Hartford, CT. USA
Posts: 618
Thanks: 12
Thanked 24 times in 18 posts
Default

http://msdn.microsoft.com/en-us/libr...rt(VS.71).aspx

scroll down left half of screen and select what ever you need.

Info displays on the right.

RJay
RJay is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
murry math indicator calculated every 2 hours walrus NinjaScript File Sharing Discussion 32 12-08-2010 12:37 PM
Murrey Math Indicator PrTester NinjaScript File Sharing Discussion 28 10-13-2010 12:03 PM
Problem using Math.ceiling & .floor kuroro13 General Programming 3 07-29-2008 02:08 PM
Murrey math indicator bamazu Indicator Development 2 01-04-2008 07:44 PM
Is it possible to call ATI functions from NinjaScript? BCA Strategy Development 3 04-17-2006 05:36 AM


All times are GMT -6. The time now is 04:35 PM.