RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Round lots Expand / Collapse
Message
Posted 8/25/2010 11:20:54 Post #12121
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
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

 

      }

}

Posted 8/26/2010 08:00:22 Post #12127
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
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 8/28/2010 08:49:51 Post #12133
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
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 8/31/2010 07:59:32 Post #12144
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
The location of the build has been emailed to you.
Posted 8/31/2010 14:56:58 Post #12147
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Thanks.
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 4:45pm

2005-2007 © RightEdge Systems