- ago
Thanks Cone! I'm just getting started with WL. How to turn a strategy into a screener?
2
853
Solved
3 Replies

Reply

Bookmark

Sort
Cone8
 ( 4.98% )
- ago
#1
Assuming that you're using Block Strategies, here are the 3 steps:

1. Put the screener conditions in a Buy or Short logic block
2. Click "Open as a C# Coded Strategy"
3. Find the Execute() method and add this statement at the top -
CODE:
if (idx < bars.Count - 1) return;

When you're done, the Execute method will start something like this:
CODE:
public override void Execute(BarHistory bars, int idx) {          if (idx < bars.Count - 1) return; // added this to make it a screener          int index = idx;          Position foundPosition0 = FindOpenPosition(0);          bool condition0;

Save your screener and run it on any DataSet. The "Signals" are the result of your screen.
3
Best Answer
just8
- ago
#2
Any chance Post #1 could be implemented as a building block? A powerpack exit called "use as screener" perhaps?

Code is simple, but making building block modifications and inserting this code is repetitive.
0
Cone8
 ( 4.98% )
- ago
#3
There were updates that made the following possible...

If you use the Screener tool (Tools menu) for EOD U.S. and German stocks, you can use block strategies "as is".
The entry logic is the screen.

You can get the same effect using the Strategy Monitor with the "Use Live Positions" Trading Preference with any strategy.
As long as you don't hold positions in the instrument you're screening, again, the entry logic will be the screen.
1

Reply

Bookmark

Sort