how to build Index from current watchlist
Author: deepbuyer
Creation Date: 9/5/2008 8:46 PM
profile picture

deepbuyer

#1
is there example of a script that refers to the index built from the current watchlist? what i need the script to do is: 1. build an index (e.g. equally weighted OHLC dataseries) that includes all symbols in the current watchlist, 2. use ROC(index) as one of the parameters when deciding whether to enter positions on a particular bar.

i tried searching the forum but the search gives me timeout error.
profile picture

Eugene

#2
QUOTE:
i tried searching the forum but the search gives me timeout error.


Although the webmaster is working out issues like this behind the scenes, you could still create a support ticket.

QUOTE:
is there example of a script that refers to the index built from the current watchlist? what i need the script to do is: 1. build an index (e.g. equally weighted OHLC dataseries) that includes all symbols in the current watchlist, 2. use ROC(index) as one of the parameters when deciding whether to enter positions on a particular bar.


Here's a code snippet illustrating how to build an index by rotating through all the dataset symbols, and apply ROC to the resulting series:

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).