- ago
Download a WL6.9 QuickRef with WL7 equivalent references from this WL6 forum post (click).


4
2,017
Solved
2 Answers

Closed

Bookmark

Sort
Cone7
- ago
#1
The most important differences to notice:

1. Generally, you should declare private references to TimeSeries (IndicatorBase derives from TimeSeries). In case you're wondering, long ago I adopted the practice of naming private variables with an underscore prefix, e.g., _smaFast, but this isn't required!

2. Create your indicators and plot them in Initialize(). Notice that you're passed a BarHistory, bars. You need to use it to qualify a series, e.g., bars.Close (not just Close).

3. Assign a value to StartIndex to begin the backtest when your indicators are valid. The Buy & Hold benchmark backtest begins on the StartIndex too!

3. The main trading loop is gone. In WL7 Execute() is called once for each bar (idx) and for each symbol's BarHistory.

4. You can no longer control the trade bar! No more bar + 1. You simply pass the BarHistory, bars, that is being Executed and WL7 takes care to create the trade on the correct bar.

The backtest is controlled by the configuration in the Strategy Settings tab. Hit F1 for the Help Guide for explanations for anything that looks new!
0
- ago
#2
For equivalents of Rules (WL6) in Blocks (WL7), see this WL6 forum topic:

https://wl6.wealth-lab.com/Forum/Posts/Rules-WL6-gt-Building-Blocks-WL7-40617/

Get the WL6 QuickRef in PDF with the addition of WL7 equivalent methods from the Wiki:

http://www2.wealth-lab.com/WL5WIKI/GetFile.aspx?File=%2fKB%2fQuickRef.pdf
0
Best Answer

Closed

Bookmark

Sort