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

Reply

Bookmark

Sort
Cone8
 ( 31.40% )
- 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.
2
Best Answer

Reply

Bookmark

Sort