The following code is supposed to disable displaying the volume pane, event icons, and the trade arrows but they are still displayed if many are drawn on the chart.
[Strategy Settings]
Single Symbol: SPY
Data Scale: Daily
Data Range: All Data
[Strategy Settings]
Single Symbol: SPY
Data Scale: Daily
Data Range: All Data
CODE:
namespace WealthScript { public class MyStrategy : UserStrategyBase { public override void Initialize(BarHistory bars) { ChartDisplaySettings cds = new ChartDisplaySettings(); cds.ShowVolumePane = false; cds.PaneSeparatorWidth = 1; cds.ColorPaneSeparator = WLColor.Black; cds.ShowEventIcons = false; cds.DisplayTradeArrows = false; SetChartDrawingOptions(cds); } public override void Execute(BarHistory bars, int idx) { if (HasOpenPosition(bars, PositionType.Long)) { if (LastOpenPosition.BarsHeld > 2) { PlaceTrade(bars, TransactionType.Sell, OrderType.Market); } } else { if (idx % 5 == 0) { PlaceTrade(bars, TransactionType.Buy, OrderType.Market); } } WLColor outer = WLColor.Orange; WLColor inner = WLColor.Black; DrawDot(idx, bars.Close[idx] * 0.99, outer, 3); DrawDot(idx, bars.Close[idx] * 0.99, inner, 1); } } }
Rename
Not for me. When I comment the DrawDot out I see nothing on the chart.
Did you set the Data Range to All Data for SPY?
Mine starts from 1996/01/02.
Shorter data range won't have the problem but only when it's longer.
Mine starts from 1996/01/02.
Shorter data range won't have the problem but only when it's longer.
After some 50,000 or so drawing commands future ones are ignored for efficiency. That’s why some drawing commands are not processed when drawing a dot on every bar for large datasets.
It worked fine on WL6 and I see no noticeable performance degradation on WL8.
Is it .NET doing the throttling or WL?
Is it .NET doing the throttling or WL?
WL6 = WinForms
WL8 = NET Core 8, WPF
WL8 = NET Core 8, WPF
My question is whether expanding the drawing objects on WL8 is possible.
We can make it an option, I’ll tag this as a #FeatureRequest
Your Response
Post
Edit Post
Login is required