Profile Picture

Round lots

Posted By Steve2008 7 Years Ago
Message
Posted Wednesday August 25 2010
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

 

      }

}


Edited: Wednesday August 25 2010 by Steve2008
Posted Thursday August 26 2010
It's a bug. It looks like when we refactored the OpenPosition code that this got moved to the wrong place. It only happens in cases where number of shares/contracts is not specified.

This will be fixed in the next build. If you need it sooner, let me know and I'll be happy to give you an internal build.
Posted Saturday August 28 2010
If you can send me the internal build, it would be helpful for some testing I am doing.

Thanks.

billb (8/26/2010)
It's a bug. It looks like when we refactored the OpenPosition code that this got moved to the wrong place. It only happens in cases where number of shares/contracts is not specified.

This will be fixed in the next build. If you need it sooner, let me know and I'll be happy to give you an internal build.
Posted Tuesday August 31 2010
The location of the build has been emailed to you.
Posted Tuesday August 31 2010
Thanks.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems