I'm trying to get a market cap of a stock but apparently, the value I'm getting is incorrect. I checked TSLA's market cap in NinjaTrader and googled TSLA market cap as well. I compared 2 values and they're not the same nor close from each other.
Here's my code:
protected override void OnFundamentalData(FundamentalDataEventArgs fundamentalDataUpdate)
{
if (fundamentalDataUpdate.FundamentalDataType == FundamentalDataType.MarketCap)
{
Print("Instrument: " + fundamentalDataUpdate.Instrument);
Print("Market Cap Double Value: " + fundamentalDataUpdate.DoubleValue);
Print("Market Cap Long Value: " + fundamentalDataUpdate.LongValue);
Print("Fundamental Data Type: " + fundamentalDataUpdate.FundamentalDataType);
}
}

Comment