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)
I've got the following problem. I have a strategy which I can test on a basket of stocks, now I want to have one equity curve therefore I want to add multiple symbols into one strategy.
I've added the symbols (SPY, DIA, SLV)and then want to work with a loop.
When using this, the different symbols will overwrite variablex. So I want to create for each symbol their own variablex.
I understand that this can be done with Arraylist.
So I add this in Variables region.
private ArrayList myArray = new ArrayList();
But how to progress further? Something like this instead of variablex?:
myArray.Add((double)(Closes[x][0]));
But then they will still write eachother over.. right?
Thanks in advance!
Can you help answer these questions from other members on NexusFi?
If I understand correctly, you will only have a limited know number of values for x. In that case a fixed array is more appropriate then an array list of variable dimension.