double volume0 = Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[0]) : Volume[0];
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
OBV and ADL are based on CryptoCurrency?
Collapse
X
-
OBV and ADL are based on CryptoCurrency?
Hello, I am looking at the ADL and OBV indicator codes and they both have this line of code:
Are these indicators both based on CryptoCurrency volume? Shouldn't they be set to reference the default instrument? They both use the default instrument for the Input Series. Why would they reference CryptoCurrency in the code?Code:
Tags: None
-
Hello JohnS52,
These indicators are not created for crypo-currency specifically, but do work with volume. With indicators that work with volume, if these were to be applied to a crypto instrument chart by the user, these must have considerations for fractional volume (whereas all other instruments have whole numbers for volume).
"Note: For working with Cryptocurrency instruments which report volume fractional, please use the VOL() indicator series, or store the volume for your script in a custom variable and convert alongside our VOL() indicator (Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[0]) : Volume[0])"
Chelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
111 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
60 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
38 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
43 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
79 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment