Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
not loading their Market Cap
Collapse
X
-
Hello HGTrader,
Thank you for your post.
If you are not getting data for these instruments, I suggest first reaching out to your data provider to verify you should be enabled for data on the instruments not loading data in the Market Analyzer.
Please let us know if you have any further questions.
Leave a comment:
-
not loading their Market Cap
Problem Description: Certain companies are not loading their Market Cap correctly and it is affecting my strategy.
I attach a screen from the Market Analyzer where you can see that it does not load the information, and consequently my code does not either.
// Buscamos el Market Cap de las Empresas
protected override void OnFundamentalData(Data.FundamentalDataEventArgs fundamentalDataUpdate)
{
// Verifica si los datos son válidos y si es el Market Cap
if (fundamentalDataUpdate.IsReset)
return;
string symbol = fundamentalDataUpdate.Instrument.FullName;
// Almacenar la capitalización de las 100 de NQ
if (fundamentalDataUpdate.FundamentalDataType == FundamentalDataType.MarketCap && fundamentalDataUpdate.DoubleValue > 0)
{
// Si el símbolo pertenece al Nasdaq 100
if (nasdaq100Symbols.Contains(symbol))
{
// Capturar el Market Cap para el Nasdaq 100
if (nasdaq100MarketCap.ContainsKey(symbol))
{
nasdaq100MarketCap[symbol] = fundamentalDataUpdate.DoubleValue; // Actualizar Market Cap
}
else
{
nasdaq100MarketCap.Add(symbol, fundamentalDataUpdate.DoubleValue); // Agregar si no existe
}
// Imprimir solo una vez la capitalización del Nasdaq 100
if (!marketCapPrintedNasdaq100.ContainsKey(symbol) || !marketCapPrintedNasdaq100[symbol])
{
// Contador del número de empresas procesadas
int processedCount = nasdaq100MarketCap.Count;
Print($"[{processedCount}/{nasdaq100Symbols.Count}] Market Cap de {symbol}: {nasdaq100MarketCap[symbol]}");
marketCapPrintedNasdaq100[symbol] = true; // Marcar como impreso
CompareSymbolsWithMarketCap();
}
}
}
}Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Windows Updates causing NT8.1.x to generate new machine ID - unstable domino effect
by xiinteractive
Started by xiinteractive, 08-08-2023, 11:55 AM
|
44 responses
887 views
3 likes
|
Last Post
by bltdavid
Today, 10:12 AM
|
||
Started by Thomas75k, 11-29-2024, 02:11 AM
|
7 responses
74 views
0 likes
|
Last Post Today, 10:04 AM | ||
Started by nelslynn, Today, 09:34 AM
|
1 response
8 views
0 likes
|
Last Post Today, 09:46 AM | ||
Started by RLS71259, Today, 09:12 AM
|
1 response
10 views
0 likes
|
Last Post Today, 09:33 AM | ||
Started by patz1398, Yesterday, 09:00 PM
|
2 responses
17 views
0 likes
|
Last Post
by patz1398
Today, 09:26 AM
|
Leave a comment: