0

I've written a couple of strategies that are profitable, but I was wondering if anyone has found a way to use that logic as a screener? That is, regardless of symbol/ticker, just have it search either ALL symbols or a watchlist of symbols to seek out opportunities that match the "buy" criteria in the script?

1 Answers1

1

You are looking for the request.security() function. Not only you can request data from different time frames but you can also request data from different ticker ids. However, maximum number of security calls you can have in your script is 40. So, it will be a screener with some limits.

See this for more.

vitruvius
  • 15,740
  • 3
  • 16
  • 26
  • Thank you, I'll have to think about this for awhile. I guess being a procedural programmer, with some occasional event driven programming, I am having a hard time getting my head around how tradingview works in terms of control loops and i/o. I'll bet that if I spent some time looking at functions, I could use request.security, with a function call to routine that I would write to do what I am trying to do. For now, I have a SQL DB so I scan that looking for candidates that meet my buy signals, then pull them up in tradingview to see if the plots look good. – TheHellYouSay Mar 01 '22 at 20:37