- ago
I just got the monthly wl7 letter from november 2021. I was pleasantly surprised with the image of them right space view on a chart with(!) the strategy applied. I video 26 the right space was mentioned on a basic bar chart (no strategy applied). and in video 26 explicitly was mentioned that right space would not work with starategies charts. however the newsletter shows differently. I am confused. is right working with strategies or not? i would very much like that; {wl6 PadBars()}.
kind regards for clarifying
0
745
Solved
3 Replies

Reply

Bookmark

Sort
Glitch8
 ( 9.28% )
- ago
#1
Creating the right space manually will not work. But you can add some in your Strategy code:

CODE:
using WealthLab.Backtest; using WealthLab.Core; using WealthLab.Indicators; namespace WealthScript1 { public class MyStrategy : UserStrategyBase { //Initialize public override void Initialize(BarHistory bars) {          bars.ExtendedBars = 20;          PlotIndicator(SMA.Series(bars.Close, 20)); } //Execute public override void Execute(BarHistory bars, int idx) { } //private members } }
0
Best Answer
- ago
#2
works perfectly, thanks for the code
---
just last question. am i right to understand that bars,ExtendedBars only works in the Initialize() section?
0
Glitch8
 ( 9.28% )
- ago
#3
I haven't tested it called from other methods, but I think it's safest to do there. Just be sure to call it BEFORE you calculate any indicators.
0

Reply

Bookmark

Sort