How can I print out a sorted list to see which is in a list, like the rotational scripts.
Thanks.
Size:
Color:
Generally, you can use PrintDebug or PrintStatusBar (may slow processing down).
Size:
Color:
thanks this doesn´t help.
for example in this script Weak-stock Rotation how can I controll and see which symbol is in
list.Sort(this); if I set PrintDebug (bar) I get only figures.
Size:
Color:
What kind of a list is it? What's in it?
Size:
Color:
for example you sort the rsi in the weak stock so I would like to see
first the last symbols with the rsi in the sorted list and add some for example
volume or close to this list.
Size:
Color:
Have you already checked the QuickRef for FirstActualBar and SetContext? They do what you request: print out a SortedList.
Size:
Color:
thanks this examples helps, but to know where it is takes time.
Thanks
Size:
Color:
Sorry, but I still hvae problems to bring the RSI in a list. It begins not at the first symbol.
CODE:
Please log in to see this code.
Size:
Color:
1. The way
RSISeries is defined, it will always be fixed to the first (clicked) symbol. Moved the definition of the DataSeries to the DataSetSymbols loop.
2.
list.Add( ds,RSISeries[ds] ) --> what this call does is to add the
ds-th bar of the static
RSISeries to the list. I think it wasn't your original intention.
CODE:
Please log in to see this code.
Size:
Color:
and last question, where do have to set the sorting features:
list.Sort(this);
I get the alert I have no defintion for sort.
Size:
Color:
In Google, or MSDN, Dotnetperls, etc., in C# books.
Size:
Color:
Eugene, the SortedList example isn't helping here because he's not using one in the RSI rotation script.
tt, the definitions are these elements:
CODE:
Please log in to see this code.
I don't think I can adequately explain (in an understandable way) how IComparer works to sort a generic list, but the "this" in ".Sort(this)" is a reference to the IComparer<RSIHolder>-derived WealthScript class.
Size:
Color:
ok. I don´t bother you, but I mean I get an error message if I set this list.Sort()
in your recommended script.
I would like to sort this. The defintion you know and I am learning. Do you think everyone is buying WL6 and is a specialist in C++
CODE:
Please log in to see this code.
Size:
Color:
SortedList, if you're asking about this Collection specifically, is called SortedList because it's already sorted and don't have to be sorted explicitly.
Size:
Color:
Well, maybe he is using the SortedList after all, but that's not what the RSI Rotation Script uses. But if you insist on using the SortedList, it sorts on the Key as you add items to the list. The ".Sort" method does not exist. See for yourself here:
http://msdn.microsoft.com/en/library/ms132319.aspxRearranging things for your example:
CODE:
Please log in to see this code.
Size:
Color:
thanks Cone. I think I have to read and read. It is now decending sort
To understand this completly which item do I have to change for acending sort here!
I find the to cut off some symbols interesting as well, but to integrate this as well
it is to much for me at the moment.
for(int i = 1; i <= c - 10; i++)
list.RemoveAt(0);
For suggestion to list features of all list definitions would be helpful. I know C++ books.
But trading script examples with list functions would help very much.
Size:
Color:
Did you mean to say "for
descending sort here"? SortedList = ascending sort order, not descending.
Because SortedList doesn't have a Reverse/Sort method, changing its order would require some extra steps. However, you can change the order by simply looping over its elements:
CODE:
Please log in to see this code.
Here it's being sorted in descending order; replace the line that does the looping with the commented out line above to change back to ascending sort order.
Size:
Color:
perfect.Sorry you ve right acending. I have to ask again, I would like to learn all
this .Getkey list.GetbyIndex(i) and and in the tutorial I don´t find so I have to go to
http://msdn.microsoft.com/en/library/ms132319.aspx is this the right place where I find all this stuff or I am reading now the recommended c++ books. This functions I think will come later, because I am reading now 3 third capital.
Size:
Color:
Yes, MSDN is the place to search for all those methods and functions but I'd recommend starting with
http://www.dotnetperls.com which is much easier to grasp.
p.s. Not C++ (as you keep stressing), but C#.
Size:
Color: