I am seeing some strange behavior when using PlotTimeSeriesOscillator. Consider following code:
Here is how it looks on the chart:
![](/api/discussion/download/image/1277-Osc1-png)
What is that blue line in the left half of the screen?
Thanks,
Maxim
CODE:
using WealthLab.Backtest; using System; using WealthLab.Core; using WealthLab.Indicators; using System.Drawing; using System.Collections.Generic; namespace WealthScript11 { public class MyStrategy : UserStrategyBase { //create indicators and other objects here, this is executed prior to the main trading loop public override void Initialize(BarHistory bars) { _spy = GetHistory(bars, "SPY"); RSI = StochRSI.Series(_spy.Close, 50); PlotTimeSeriesOscillator(RSI, "RSI", "RSI", 10, 90, Color.FromArgb(255, 0, 128, 128), Color.FromArgb(63, 255, 0, 0), Color.FromArgb(63, 0, 0, 255),80); } //execute the strategy rules here, this is executed once for each bar in the backtest history public override void Execute(BarHistory bars, int idx) { if (!HasOpenPosition(bars, PositionType.Long)) { //code your buy conditions here } else { //code your sell conditions here } } //declare private variables below TimeSeries RSI; BarHistory _spy; } }
Here is how it looks on the chart:
What is that blue line in the left half of the screen?
Thanks,
Maxim
Rename
Indeed it looks like you discovered a bug here. Thank you for the report.
Thank you for confirming! I initially swapped oversold and overbought values by mistake when calling that function - PlotTimeSeriesOscillator(RSI, "RSI", "RSI", 90, 10, ... .
For that specific case, the resulting chart looks even more interesting, and it changes as you scroll left and right, but I do not know if that is technically a bug too, since it is obtained by passing incorrect parameters.
For that specific case, the resulting chart looks even more interesting, and it changes as you scroll left and right, but I do not know if that is technically a bug too, since it is obtained by passing incorrect parameters.
Fixed for Build 29.
Your Response
Post
Edit Post
Login is required