| In a live trading system connecting to a simulated account at IB, when I select "force round lots" the order size is always 100 shares, instead of being rounded to the nearest 100 shares. This is happening on every stock. I'm using a fixed value of $25,000, which should produce a lot more than 100 shares for most of the stocks. My open statement is simply: OpenPosition(PositionType.Long, OrderType.Market); Is this a known bug? UPDATE: This happens not only in my system, but in the Bollinger Penetration system (with a 30 bar exit): #region Using statements using System; using System.Drawing; using System.Collections.Generic; using System.Linq; using RightEdge.Common; using RightEdge.Common.ChartObjects; using RightEdge.Indicators; #endregion #region System class public class MySystem : MySystemBase { public override void Startup() { // Perform initialization or set system wide options here } } #endregion public class MySymbolScript : MySymbolScriptBase { Frequency DailyFreq; BollingerBandLower bbl; public override void Startup() { // Perform initialization here. SystemData.CreateTicksFromBars = false; //DailyFreq = GetFrequency(BarFrequency.Daily); bbl = new BollingerBandLower(14, 1.5); bbl.SetInputs(Close); } public override void NewBar() { // Put your trading code here OpenPosition(PositionType.Long, OrderType.Limit, bbl.Current); } public override void OrderFilled(Position position, Trade trade) { // This method is called when an order is filled } public override void OrderCancelled(Position position, Order order, string information) { // This method is called when an order is cancelled or rejected } }
|