- ago
Issue: The Trade Signals are showing incorrect position size if there is more than one open position for a symbol.
It appears the size of the first position is being used for all positions.
Using Build 72; issue noticed after a recent update.

It's easily verified, as follows:
Test code:
CODE:
using WealthLab.Backtest; using System; using WealthLab.Core; using WealthLab.Data; using WealthLab.Indicators; using System.Collections.Generic; namespace WealthScript9 { 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) { } //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 (idx == bars.Count -2)             PlaceTrade(bars, TransactionType.Buy, OrderType.Market);          if (idx == bars.Count - 22)             PlaceTrade(bars, TransactionType.Buy, OrderType.Market);          if (idx == bars.Count - 42)             PlaceTrade(bars, TransactionType.Buy, OrderType.Market);          foreach (Position p in OpenPositions)             ClosePosition(p, OrderType.Limit, p.EntryPrice *2, "100% Profit"); } //declare private variables below } }


Settings:


Positions tab shows correct sizes:


Signals tab shows incorrect sizes (all positions have size of 1st position):


Issue is also present in Strategy Monitor.
0
170
Solved
3 Replies

Reply

Bookmark

Sort
Cone8
 ( 25.44% )
- ago
#1
Thanks, we'll look into that ASAP!
0
Glitch8
 ( 11.81% )
- ago
#2
Thanks for the report, we have it corrected for Build 73.
1
Best Answer
- ago
#3
Working OK in B73... thanks.
2

Reply

Bookmark

Sort