![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jan 2011
Posts: 294
Thanks: 9
Thanked 22 times in 19 posts
|
Hi,
I was trying to perform an order of magnitude calculation when I ran into the following issue: double rawPrice = (Open[0] + High[0] + Low[0] + Close[0]) * 0.25; int magnitude = Math.Floor(Math.Log10(Math.Abs(rawPrice))); This will not compile even though it should. I had to do an explicit cast to get this to compile; i.e. double rawPrice = (Open[0] + High[0] + Low[0] + Close[0]) * 0.25; int magnitude = (int)Math.Floor(Math.Log10(Math.Abs(rawPrice))); Am I missing something here? Please advise. Thank you very much. |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Data Series won't Display overnight data with 6 Range Type | Trader108 | Charting | 11 | 02-17-2011 07:08 AM |
| Strategy - Strange result on SIM accout w/ live market data | mjc4118 | Version 7 Beta General Questions & Bug Reports | 4 | 08-05-2010 11:09 AM |
| B14 - MBT data feed strange scenario. | xTrader1 | Version 7 Beta General Questions & Bug Reports | 2 | 04-28-2010 12:05 PM |
| Strange issue with "Real time performance" screen | Mike_D | Automated Trading | 1 | 01-21-2009 07:14 AM |
| very strange issue when I use the strategy wizard | MoreYummy | Automated Trading | 4 | 08-05-2008 10:48 PM |