Watchlist

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #53627
    Avatar
    Karen
    • Topics: 9
    • Replies: 17
    • Posts: 26

    Hi, I am not sure why this code does not work for ASX:COL.  It seems to work for stocks with more than 200 days history fine.

    This stock has less than 200 days history and it is bringing back a “True” response in my watchlist for some reason due to it not having more than 200 days information.  In my view it should return False / 0 response as there are less than 200 days history. Can someone please help me with this as I have tried everything to get it to work.  I have screen shot my settings below – please let me know what I am doing wrong.

     

    V1 = (MA(BARS=3, STYLE=Exponential) <= MA(BARS=7, STYLE=Exponential) and (CLOSE() < MA(BARS=200, STYLE=Simple)))*1;

    if(BARCOUNT()>=200, V1,0)*1

    Thanks,

    Karen

    #53629
    Matthew
    Matthew
    • Topics: 4
    • Replies: 190
    • Posts: 194

    Hi Karen,

    I’m not sure of the function of the *1 at the end of each line?  I removed it, and also adjusted some of the brackets in the V1 variable, and the script is returning the expected result for COL now:

    Chart & Watchlist Example:

    Ex10

    #53657
    Avatar
    Karen
    • Topics: 9
    • Replies: 17
    • Posts: 26

    Thanks Matthew, I will try that.

    Kind regards,
    Karen

Viewing 3 posts - 1 through 3 (of 3 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