NexusFi: Find Your Edge


Home Menu

 





SortedList with internal class IndexOfValue


Discussion in NinjaTrader

Updated
    1. trending_up 2,615 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
TAJTrades
Here, GA
 
Posts: 158 since Jun 2009
Thanks Given: 1
Thanks Received: 87

Posted this on the NT Forum and got the usual "Non Answer" back. SURPRISE!

Hoping someone on BigMike's cxan shed some light on this. I have found many references for for KeyValuePairs that have a single Value but nothing for multiple Values.

Trying to learn how to get the Index of a Value using internal class. I have found many references for basic KeyValuePairs but nothing on internal class. Could someone pass a website showing this procedure or offer a solution?


internal class IndicatorInfo
{
public int DescriptionType= 0;
public string TempOne = "";
public string TempTwo = "";
}
private SortedList<double, IndicatorInfo> IndicatorValueList = new SortedList<double, IndicatorInfo>();


Obviously this does not work nor has many, many other variations:

int IndexOfTempOne = IndicatorValueList.IndexOfValue(TempOneString);

I need to find what does work.

Thanks


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
3 thanks
  #3 (permalink)
 gomi 
Paris
Legendary Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,506


yYou need to loop through all elements in the list, get the IndicatorInfo Value from the keyvaluepair, an then check if TempOne is what you are looking for. If not, continue iterating through the loop.

There is no built in function, you need to write your own search iterator


Reply With Quote
  #4 (permalink)
TAJTrades
Here, GA
 
Posts: 158 since Jun 2009
Thanks Given: 1
Thanks Received: 87

Thanks gomi for confirming what I thought. Thought that might be the case after exhausting all the local libraries, book stores and websites trying to find the built in solution.


Reply With Quote




Last Updated on November 10, 2010


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts