[backtest bug] ModifyPosition and Commission 3.0
Created at 30 May 2018, 01:08
[backtest bug] ModifyPosition and Commission 3.0
30 May 2018, 01:08
hi ..
i see bug in the new API in 3.0
ModifyPosition(position,volume)
the bug is:
backtest dont count Commission
see:
the project for test:
using System; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class test : Robot { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } protected override void OnStart() { Position p = ExecuteMarketOrder(TradeType.Buy, Symbol, Symbol.VolumeInUnitsMin, "", null, 1).Position; ModifyPosition(p, p.VolumeInUnits * 2); // double volume } protected override void OnTick() { } protected override void OnStop() { } } }
PanagiotisCharalampous
30 May 2018, 11:07
Hi dleeeq8,
Thanks, we will investigate.
Best Regards,
Panagiotis
@PanagiotisCharalampous