Multiple Symbol list Script values for historical data

Optuma Forums Optuma Scripting Multiple Symbol list Script values for historical data

Tagged: 

This topic contains 6 replies, has 2 voices, and was last updated by Avatar Dan 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #51807
    Avatar
    Dan
    • Topics: 3
    • Replies: 5
    • Posts: 8

    Hi.
    I have tried using the Watchlist and Scanning Manager to return the value using a script within a 10 year range and it doesn’t seem to work.
    Scanning Manager only returned the date for the 1st occurrence and Watchlist only returned at most 2 occurrences for a ticker but ShowMe showed many occurrences for that ticker.
    For example, if I have a list of multiple tickers that are imported from a csv and want to find how many times a condition occurred as a back test
    such as: BARSTRUE(MA(STYLE=Exponential, BARS=10, CALC=Close) CrossesAbove MA(STYLE=Exponential, CALC=Close, BARS=20));
    So each ticker would show a value of how many times the faster MA crossed above the slower MA for a 10 year period for daily historical data.
    Is there a way to achieve this?

    #51819
    Matthew
    Matthew
    • Topics: 4
    • Replies: 186
    • Posts: 190

    Hi Dan,

    The BarsTrue() function is usefull if there is a specific look back period you want to check. However in your example you are wanting to check the entire history for each code, which varies from code to code.

    In this scenario i’d suggest using the ACC() function instead.

    Using the Moving Averages in your example the updated script would look like this…

    Add the above script to a Watchlist and you should see the result you are after.

    #51827
    Avatar
    Dan
    • Topics: 3
    • Replies: 5
    • Posts: 8

    Thanks Mathew. This is quite helpful.

    So I went further and was creating multiple conditions assigned to v1 in relation to this question and not sure why a number of them did not return a value and some others returned 0 for the ACC() function. ARNC and NLSN did not return a value for the following script:

    VX = GETDATA(CODE=VIX:WI);

    COND1 = CLOSE() < MA(STYLE=Exponential, BARS=30, CALC=Close) ;

    COND2 = VX > 20;

    COND3 = CLOSE() CrossesBelow BB(BARS=30).LowerLine;

    COND4 = (RSI(BARS=30) > 25) and (RSI(BARS=30) < 55);

    V1 = COND1 and COND2 and COND3 and COND4;

    ACC(V1);

    #51835
    Matthew
    Matthew
    • Topics: 4
    • Replies: 186
    • Posts: 190

    Hi Dan,

    The script looks fine and is working ok here on both those codes (ARNC returns 7 and NLSN returns 19). I believe both of those codes recently moved to the NYSE so you may want to open a chart for each to make sure the full history is there. If it is not run through Option 2 listed on the following article…

    https://help.optuma.com/kb/faq.php?id=793

    #51867
    Avatar
    Dan
    • Topics: 3
    • Replies: 5
    • Posts: 8

    Hi Mathew. I don’t have NYSE and ARNC only comes up in US Equities andis only pulling as of 2016, 33 bars. I have downloaded the history for US Equities, ARNC itself and end of day data. It is showing last downloaded date of March 19, 2019. And when apply the logic in ShowBar (without ACC()), it does create the signal 7 times as you have stated but the Test column where I have my script shows nothing. Also, not sure why tickers show up twice. I have attached screenshots. Thanks.

     

     

    Attachments:
    #51891
    Matthew
    Matthew
    • Topics: 4
    • Replies: 186
    • Posts: 190

    Hi Dan,

    I am unable to repeat the issue on my system here. Can you please send me the workbook containing the Watchlist in your screen shot an i will test it here (it maybe some combination of settings at work).

    Workbook files by default are stored here: My Documents – Optuma – Local – Workbooks

    Please email the workbook file to support@optuma.com

    #51895
    Avatar
    Dan
    • Topics: 3
    • Replies: 5
    • Posts: 8

    I removed the duplicates and not sure how why they were duplicated, but it now works. 

    I see a value returned for all the tickers. Thanks for your help.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close