View Full Version : ind migration isssues to 7
ATI user
10-06-2009, 01:47 PM
FYI
my cs ind would not run on 7 until I changed the following manually:
DrawText -- added bool and pixeloffset where missing
DrawLine -- added bool where missing
DrawHorizontalLine -- added bool where missing
Changed all volume related variables from 'int' to double'
works same as in 6.5 ...only much faster in replay
eDanny
10-06-2009, 01:54 PM
None of the Draw statements work for me as yet. Did you try changing the Int to Long before you tried Double?
NinjaTrader_Josh
10-06-2009, 01:58 PM
eDanny is right. The volumes are longs and we do recommend using long types.
ATI user
10-06-2009, 02:09 PM
yes...I set all variables, incl arrays, from int to long and every line of code that set one of those variables to Volume[0] gave the compile error
' can not implicitly convert double to long...'
when I changed all the longs to doubles....it worked perfectly
NinjaTrader_Dierk
10-07-2009, 01:20 AM
You likely have some custom in place where you assign an int to a double -> this works no problem.
Now as the Volume no longer is int but long this no longer work. You need to rip through each and every code line which throws this error, understand the nature of the compiler error message and amend your variables types accordingly or apply type casts if that would be safe.
I would think MS has some documentation online which would provide details on the different types and their assingment and implicit casting logic.
ATI user
10-07-2009, 11:03 AM
Dierk
Now I am confused
my 6.5 code uses int variables which are assigned to Volume which returned int
in 7 I change all those ints to longs and it would not run
I went to Volume topic in 7 and your doc says vol returns 'double'
so I changed all the int/long variables to double and my cs runs perfectly
please explain
NinjaTrader_Josh
10-07-2009, 11:31 AM
Maybe it would be best if we saw actual code of what you are doing. VOL() as an indicator is indeed double. Please clarify which exactly you are using. Thank you.
ATI user
10-07-2009, 04:32 PM
I am referring to the dataseries
see pic...user manual says it returns double
based on my cs working with everything set to double, I assumed it indeed does not return long
NinjaTrader_Josh
10-07-2009, 04:43 PM
Note: The Help Guide included in NT7 beta right now is very much a WIP and may have legacy articles in place.
Volume[] DataSeries is indeed a double. The ones that are now longs are these:
GetCurrentAskVolume()
GetCurrentBidVolume()
MarketDataEventArgs.Volume
MarketDepthEventArgs.Volume