Creating a scan from a 'show view' script

Optuma Forums Optuma Scripting Creating a scan from a 'show view' script

This topic contains 7 replies, has 3 voices, and was last updated by  Colin 1 month, 2 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #46959

    Colin
    • Topics: 5
    • Replies: 9
    • Posts: 14

    Hi,
    I’ve searched everywhere for technicals on scanning scripts, but there’s nothing I can find to help me understand what’s gone wrong.
    I have a working ‘show view’ script with the plots stripped out. Scanning wants a single logical at the end. So I chose 
    Ton[0]. This is the most recent value of the boolean variable of interest. I had to start somewhere.
    Instead of getting any results I get the attached “Unknown Function (T2 = 0.00) etc etc “
    Q1 What this is telling me? What do I do about it?
    NOTE: Daily data evolution manually computes over the entire history of the stock contributes to the state of Ton. Restricting the scan to a single time/date or interval not possible. It may make the scan take a while, but that’s OK. In reality I want to pay attention to the state of Ton over the last 3 days and select stocks.
    Clues anyone?
    cheers
    colin

     
     

    Attachments:
    #46967
    Peter
    Peter
    • Topics: 1
    • Replies: 42
    • Posts: 43

    Hi Colin

    I put pre tags around your code in your post so we could see it a little easier. The pre stands for pre-formatted and it good to use in these cases.

    The error you found turns out to be a problem with our comment parser. If you remove these comment lines from the script the script should scan without errors.

    So the top of the script is then

    We will have a look at why those comment are causing errors and will update with a fix ASAP.
    I would guess its because the comment has brackets that is causing the issue.

    Best Regards
    Peter

    #46983

    Colin
    • Topics: 5
    • Replies: 9
    • Posts: 14

    Hi Peter,
    Thanks! I removed  comments (although I’m not sure what you mean by a pre tag. If you can tell me what I do to format it, happy to do it).
    The scans now seem to work with one problem:
    =================
    Codes to scan: “C live Pool” has 216 codes (CSV attached)
    Date Range:  Last bar
    Data Timeframe: 1 Day
    TEST 1
    Ton     23 results
    Ton >= 1       23 results
    Ton <= 0     190 results
    Total results = 213.
    TEST 2
    Toff >= 1    35 results
    Toff <= 0     178 results
    Total results = 213.
    TEST 3
    TRADING   105 results
    TRADING <= 0      108 results
    Total results = 213.
    I’ve attached the C live Pool list as a .CSV. If you look you’ll see there are 216 codes in the list.
    As you know, it’s impossible for a particular code to be other than 1 or  zero.
    Any insights as to what 3 codes are missed and why? I’m assuming I messed something up, but I can’t see what it is.
    regards,
    colin
    ==============

    =============================

    Attachments:
    #47003
    Matthew
    Matthew
    • Topics: 3
    • Replies: 58
    • Posts: 61

    Hi Colin,

    Looking at the list, i believe 3 codes are being missed as they do not have up to date data.

    AIS – 29-05

    CGS – 29-05

    MAQ – 28-05

    I’ve checked the data against the ASX and I can confirm these last bar date for these codes is correct, so they maybe in a temporary trading halt at the moment.

    #47007

    Colin
    • Topics: 5
    • Replies: 9
    • Posts: 14

    Thanks,

    You’re right. Data is old although none are signified as halted.

    I didn’t know to look.

    Q. Why doesn’t optuma come up with the little warning sign I’ve seen in other charts?

    I’ll be more vigilant on data from now on!

    cheers

    colin

     

     

    #47019
    Matthew
    Matthew
    • Topics: 3
    • Replies: 58
    • Posts: 61

    Hi Colin,

    The system shows an alert for data if it is 4+ days older than the current date.  This is done to prevent incorrect alerts that would occur from events such as long weekends.

    #47039
    Peter
    Peter
    • Topics: 1
    • Replies: 42
    • Posts: 43

    Hi Colin

    FYI, I have added a sticky post to this forum describing how to add code to a post.

    https://forum.optuma.com/topic/adding-code-to-forum-posts/

    Peter

    • This reply was modified 1 month, 2 weeks ago by Peter Peter.
    #47055

    Colin
    • Topics: 5
    • Replies: 9
    • Posts: 14

    Thanks Peter!

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

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This

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