- ago
I am seeing some strange behavior when using PlotTimeSeriesOscillator. Consider following code:

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
0
420
Solved
4 Replies

Reply

Bookmark

Sort
Glitch8
 ( 14.17% )
- ago
#1
Indeed it looks like you discovered a bug here. Thank you for the report.
1
- ago
#2
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.

0
- ago
#3
0
Glitch8
 ( 14.17% )
- ago
#4
Fixed for Build 29.
0
Best Answer

Reply

Bookmark

Sort