Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
(The list can be a list of a class and then you can
store various information in every record.)
// create a list of int
List<int> myCloseList = new List<int>();
// store the last 20 Close prices in the list
for (int i = 0; i < 20; i++)
{
myCloseList.Add(Close[i]);
}
// second logic
for (int i= 0; i < myCloseList.Count; i++)
{
if (myCloseList[i] > 45
Print("Found record : "+i+" with Close "+Close[i]);
}
(The list can be a list of a class and then you can
store various information in every record.)
// create a list of int
List<int> myCloseList = new List<int>();
// store the last 20 Close prices in the list
for (int i = 0; i < 20; i++)
{
myCloseList.Add(Close[i]);
}
// second logic
for (int i= 0; i < myCloseList.Count; i++)
{
if (myCloseList[i] > 45
Print("Found record : "+i+" with Close "+Close[i]);
}
so lets say close[3] and close[6] and close[18] was greater than 45.00 how do I get each of them to exist in a new list, where I can chose based on math.max, and math.min which one value I want, so 18 for math.max and 3 for math.min?
not sure if thats the right logic, but thats what I want to do.
so lets say close[3] and close[6] and close[18] was greater than 45.00 how do I get each of them to exist in a new list, where I can chose based on math.max, and math.min which one value I want, so 18 for math.max and 3 for math.min?
not sure if thats the right logic, but thats what I want to do.
you could create a new list
and add the once that are found to that list
then you will walk through that list and get the max and min out of it
it that sound a bit like chinese
then i would recommend taking the time to read a small c# introduction book
it will greatly pay off