no qualifying symbols when using open price as qualifier

idaganiidagani Posts: 11
edited March 2017 in Under The Hood

Hello,

one of the conditions I am using in 'is_symbol_qualified' is :

md.L1.open >= 3

when script is run, no symbol qualifies (content of symbol universe tab is empty).

If I disable this conditions, I get symbols qualifying.

Please advise.

Best,
Itay

Comments

  • mgmg Posts: 13
    edited March 2017

    You should try to use market data objects that are static through the day in your is_symbol_qualified(). More than likely, your strategy is being deployed prior to market open and at that point md.L1.open is initialized to a nan. md.stat.prev_close would be more appropriate for your use case.

  • idaganiidagani Posts: 11

    Thanks Memo,
    makes sense.

    I also tried md.L1.last and it doesn't work,
    do you think its also gets a nan value ?

    Best,
    Itay

  • mgmg Posts: 13
    edited March 2017

    That is correct. You should use values that are static during the trading day in your is_symbol_qualified() method.

  • idaganiidagani Posts: 11

    Thanks Memo

Sign In or Register to comment.