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
kind regards for clarifying
Rename
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 } }
works perfectly, thanks for the code
---
just last question. am i right to understand that bars,ExtendedBars only works in the Initialize() section?
---
just last question. am i right to understand that bars,ExtendedBars only works in the Initialize() section?
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.
Your Response
Post
Edit Post
Login is required