Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OBV and ADL are based on CryptoCurrency?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:
    Code:
    double volume0    = Instrument.MasterInstrument.InstrumentType == InstrumentType.CryptoCurrency ? Core.Globals.ToCryptocurrencyVolume((long)Volume[0]) : Volume[0];
    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?
    Attached Files

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    41 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X