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 terofs, Yesterday, 04:18 PM
    1 response
    21 views
    0 likes
    Last Post terofs
    by terofs
     
    Started by CommonWhale, Today, 09:55 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by Gerik, Today, 09:40 AM
    2 responses
    7 views
    0 likes
    Last Post Gerik
    by Gerik
     
    Started by RookieTrader, Today, 09:37 AM
    2 responses
    13 views
    0 likes
    Last Post RookieTrader  
    Started by alifarahani, Today, 09:40 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X