﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>RightEdge Forums / Trading / Order Execution </title><generator>InstantForum.NET v4.1.4</generator><description>RightEdge Forums</description><link>http://www.rightedgesystems.com/forums/</link><webMaster>rightedge@yyesoftware.com</webMaster><lastBuildDate>Wed, 15 Oct 2008 21:48:37 GMT</lastBuildDate><ttl>20</ttl><item><title>IB Symbol</title><link>http://www.rightedgesystems.com/forums/Topic6133-11-1.aspx</link><description>I have installed RE 2008/1 366 and try to configure my watchlist with IB-Futures. All woks fine with ES,ER2,NQ,EMD,ZN and ZB but I cannot get historical data for YM, 6A,6B,6C,6E, QM,QG&lt;/P&gt;&lt;P&gt;I also have tried AUD instead of 6A but I always get the error no 200, IB-Symbol not correct.&lt;/P&gt;&lt;P&gt;How can I setup my watchlist for ib-futures ? </description><pubDate>Tue, 15 Jul 2008 06:59:16 GMT</pubDate><dc:creator>Fritz</dc:creator></item><item><title>Live system misses trade signals</title><link>http://www.rightedgesystems.com/forums/Topic6078-11-1.aspx</link><description>My live system seems to ocassionally ignore trade signals based on 1 minute data. In those instances, it does not generate pending orders (it goes without saying that the live system was activated). However, when I run a simulation these trades do show up in the trade list results as expected. What could have caused this?</description><pubDate>Wed, 02 Jul 2008 06:54:34 GMT</pubDate><dc:creator>Ossie68</dc:creator></item><item><title>How to place a simple trailing stop?</title><link>http://www.rightedgesystems.com/forums/Topic5882-11-1.aspx</link><description>Hello,&lt;br&gt;&lt;br&gt;can someone please show me an example that shows how to place a simple trailing stop that takes the lowest low of the last 3 bars on a long position. Or if the way to implement it is principle the same then just a simple ATR TrailingStop.&lt;br&gt;&lt;br&gt;I've searched for it but wasn't really successfully. Even also the examples that are delivered with the RE installation doesn't include a trailingstop. However, we all know how important a trailing stop is. :)&lt;br&gt;</description><pubDate>Sat, 07 Jun 2008 20:01:04 GMT</pubDate><dc:creator>ThomasZ</dc:creator></item><item><title>Live system does not initiate orders</title><link>http://www.rightedgesystems.com/forums/Topic5730-11-1.aspx</link><description>I try to run my trading system in the live environment but it does not place orders upon trigger signals. I have my IB TWS simulation (paper trading) account running in the background to execute the orders but nothing happens. However, the IB live data feeds works fine and so does the trading system when running the simulation. Also, the folder that contains the symbol I want to trade has IB set as the Broker Service to be used. What am I missing here?&lt;P&gt;The symbol I want to trade is an 'EOE' future (Currency: EUR / Exchange: FTA / Tick size: 0.05 / Contract size: 200 / Exchange opening hours from 9 AM - 17:35 PM CET or 3 - 11:35 AM EST). I understand from &lt;A href="http://www.rightedgesystems.com/forums/FindPost1819.aspx"&gt;http://www.rightedgesystems.com/forums/FindPost1819.aspx&lt;/A&gt; that you have to make sure that you have the tick size and contract size set correctly in the symbol information, otherwise IB may reject the order because it does not conform to the minimum price variation.</description><pubDate>Wed, 21 May 2008 15:19:53 GMT</pubDate><dc:creator>Ossie68</dc:creator></item><item><title>Error after starting live system</title><link>http://www.rightedgesystems.com/forums/Topic5781-11-1.aspx</link><description>RE succesfully executed an order on a trading system signal that appeared in the Open Positions pane as well in my TWS paper trade account. Later, I stopped the live system and when I tried to restart the live system some time later, I got the below error message. I don't see the open position in RE any longer but I do see it in TWS, however, I notice that the "API" page tab in TWS that was created once the order was filled has disappeared.&lt;P&gt;An exception of type System.InvalidOperationException was thrown.&lt;BR&gt;There is an error in XML document (31, 34).&lt;BR&gt;   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)&lt;BR&gt;   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)&lt;BR&gt;   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)&lt;BR&gt;   at RightEdge.Common.PositionManager.LoadOpenPositions(String fileName)&lt;BR&gt;   at RightEdge.LiveSystem&amp;#119;indow.x0fa035c1818e31d7(SystemDataCreationSettings xb6b3da7953a69f26, String xe125219852864557)&lt;BR&gt;   at RightEdge.LiveSystem&amp;#119;indow.StartLiveSystem(xfb471916970b0c9e liveDataWindow, List`1 symbols, SystemDataCreationSettings settings, SystemRunInfo runInfo, RightEdgeCompiler compiler)&lt;BR&gt;   at RightEdge.xf266856f631ec016.x7315d87aa80c241d()&lt;BR&gt;   at RightEdge.xf266856f631ec016.xc44f2b7498b700f7(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)&lt;BR&gt;   at TD.SandBar.ToolbarItemBase.OnActivate()&lt;BR&gt;   at TD.SandBar.ButtonItemBase.OnActivate()&lt;BR&gt;   at TD.SandBar.ButtonItem.OnActivate()&lt;BR&gt;   at TD.SandBar.ToolBar.OnItemRelease(ToolbarItemBase item, Point position)&lt;BR&gt;   at TD.SandBar.ToolBar.OnMouseUp(MouseEventArgs e)&lt;BR&gt;   at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;BR&gt;   at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;   at TD.SandBar.ToolBar.WndProc(Message&amp;amp; m)&lt;BR&gt;   at RightEdgeUI.CustomToolBar.WndProc(Message&amp;amp; m)&lt;BR&gt;   at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;BR&gt;   at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;BR&gt;   at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;/P&gt;&lt;P&gt;Inner Exception:&lt;BR&gt;An exception of type System.Xml.XmlException was thrown.&lt;BR&gt;Content cannot be converted to the type Double. Line 31, position 34.&lt;BR&gt;   at System.Xml.XmlReader.ReadContentAsDouble()&lt;BR&gt;   at System.Xml.XmlReader.ReadElementContentAsDouble()&lt;BR&gt;   at RightEdge.Common.Price.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader)&lt;BR&gt;   at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable, Boolean wrappedAny)&lt;BR&gt;   at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable)&lt;BR&gt;   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPortfolioXml.Read11_TradeInfo(Boolean isNullable, Boolean checkType)&lt;BR&gt;   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPortfolioXml.Read14_PositionDataXml(Boolean isNullable, Boolean checkType)&lt;BR&gt;   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPortfolioXml.Read19_PortfolioXml(Boolean isNullable, Boolean checkType)&lt;BR&gt;   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPortfolioXml.Read20_PortfolioXml()&lt;/P&gt;&lt;P&gt;Inner Exception:&lt;BR&gt;An exception of type System.FormatException was thrown.&lt;BR&gt;Input string was not in a correct format.&lt;BR&gt;   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp;amp; number, NumberFormatInfo info, Boolean parseDecimal)&lt;BR&gt;   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)&lt;BR&gt;   at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)&lt;BR&gt;   at System.Xml.XmlConvert.ToDouble(String s)&lt;BR&gt;   at System.Xml.XmlReader.ReadContentAsDouble() </description><pubDate>Tue, 27 May 2008 04:31:05 GMT</pubDate><dc:creator>Ossie68</dc:creator></item><item><title>EOD Market Order; what price is used?</title><link>http://www.rightedgesystems.com/forums/Topic5777-11-1.aspx</link><description>I build a system and test against the "paper broker".&lt;/P&gt;&lt;P&gt;When it fills a market order, what price does it use? For EOD is market the H+L*.5 (average price)?&lt;/P&gt;&lt;P&gt;and does it base the fill on today's price OR the next day's price?&lt;/P&gt;&lt;P&gt;Clearly, when the system goes live, the entry orders I place (based on the scan) will be delayed by a day; the exit market orders will also be delayed...&lt;/P&gt;&lt;P&gt;Just trying to get ny head around it...&lt;/P&gt;&lt;P&gt;Thanks!  </description><pubDate>Mon, 26 May 2008 10:11:15 GMT</pubDate><dc:creator>hairy_mug</dc:creator></item><item><title>Stop loss order rejected</title><link>http://www.rightedgesystems.com/forums/Topic5693-11-1.aspx</link><description>I'm using Live System to trade through Interactive Brokers and I'm having a bit of a problem with the stop-loss orders.  The market order to buy gets filled and the stop-limit order for my profit target goes through but the stop-loss order always comes back "Stop loss order rejected: the price does not conform to the minimum price variation for this contract."&lt;/P&gt;&lt;P&gt;I've searched the forum but I don't seem to see this problem mentioned.  Any help is appreciated.  Thanks. </description><pubDate>Tue, 20 May 2008 15:33:08 GMT</pubDate><dc:creator>jcd77ehq</dc:creator></item><item><title>Discretionary trades</title><link>http://www.rightedgesystems.com/forums/Topic4748-11-1.aspx</link><description>&lt;FONT size=2&gt;&lt;P&gt;While discretionary trading is a welcome addition, more explanation is needed. Are fill, cancel and update events triggered? Do the trades happen immediately, or at the next bar end (as if they constituted a "trigger")? One concern is that my placeorder procedure sets a number of enviromental conditions that are presumed to be in place when events occur. Is there a flag that distinguishes discretionary trades from others? That might be used to exempt discretionary trades from some checking.&lt;/P&gt;&lt;P&gt;Further, one might want the ability to declare that a trade has occured, one that does not drive events. This arises where you have made a manual trade in TWS and you subsequently want your RE strategy to pick the point to cover.&lt;/P&gt;&lt;P&gt;(I don't find anything in the Help or Guide documentation?)&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 04 Mar 2008 09:28:22 GMT</pubDate><dc:creator>phg</dc:creator></item><item><title>PositionOrder Examples</title><link>http://www.rightedgesystems.com/forums/Topic3822-11-1.aspx</link><description>Are there any examples of the use of PositionOrder objects in any of the sample strategies or ones uploaded to the site? Am I right that you have to use one if you want to set a BarsValid number?</description><pubDate>Wed, 17 Oct 2007 16:51:32 GMT</pubDate><dc:creator>phg</dc:creator></item><item><title>Order timing out throughs in an error before fill in live trading</title><link>http://www.rightedgesystems.com/forums/Topic4342-11-1.aspx</link><description>Something is wrong but what?&lt;P&gt;Running in live strategy mode after the system executing an openingsorder on signals this error is made.In the live system console the order is set as pending order.&lt;/P&gt;&lt;P&gt;Broker = paperbroker connected through TWS from IB.&lt;/P&gt;&lt;P&gt;Instruments on 1 min charts&lt;/P&gt;&lt;P&gt;An exception of type System.AppDomainUnloadedException was thrown.&lt;BR&gt;Attempted to access an unloaded AppDomain.&lt;BR&gt;   at RightEdge.Shared.CallbackStub.DoCallback()&lt;BR&gt;   at RightEdge.Shared.MainDomainStub.&amp;lt;&amp;gt;c__DisplayClass1.&amp;lt;Post&amp;gt;b__0()&lt;BR&gt;   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)&lt;BR&gt;   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)&lt;BR&gt;   at System.Threading.ExecutionContext.runTryCode(Object userData)&lt;BR&gt;   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)&lt;BR&gt;   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR&gt;   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;BR&gt;   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)&lt;BR&gt;   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()&lt;/P&gt;&lt;P&gt;second &lt;/P&gt;&lt;P&gt;Unable to cancel order that timed out: &lt;BR&gt;   at RightEdge.Common.PositionManager.ProcessTimeouts(PositionData pos, NewBarInfo info, Boolean&amp;amp; changed)&lt;BR&gt;   at RightEdge.Common.PositionManager.SimNewBar(NewBarInfo info)&lt;BR&gt;   at RightEdge.Common.BaseSystemHistory.SimNewBar(NewBarInfo info)&lt;BR&gt;   at RightEdge.Common.SystemData.NewBar(NewBarInfo info)&lt;BR&gt;   at RightEdge.SystemWrapper.NewBar(Dictionary`2 bars)&lt;BR&gt;   at RightEdge.SystemWrapper.NewBar(Dictionary`2 bars)&lt;BR&gt;   at RightEdge.TradingModuleWrapper.NewBar(Dictionary`2 bars)&lt;BR&gt;   at RightEdge.LiveSystem&amp;#119;indow.x2e01f099ee7feedb(Dictionary`2 xd3a52115666f4605)</description><pubDate>Thu, 17 Jan 2008 15:47:32 GMT</pubDate><dc:creator>eeikel</dc:creator></item><item><title>Realtime Hedge: OpenPosition() called form OrderFilled()</title><link>http://www.rightedgesystems.com/forums/Topic4283-11-1.aspx</link><description>In order to get a realtime hedge I tried to open a short position whenever one of my long positions gets filled.&lt;br&gt;&lt;br&gt;I placed an OpenPosition( ... Short ...) inside the OrderFilled() Event Handler.&lt;br&gt;&lt;br&gt;BUT: it looks like RE ignores this OpenPosition() call. If I place exactly the same call somewhere outside the event handler (say in NewSymbolBar) everything works fine...&lt;br&gt;&lt;br&gt;Any ideas?</description><pubDate>Mon, 14 Jan 2008 10:06:12 GMT</pubDate><dc:creator>DrKoch</dc:creator></item><item><title>Position order status</title><link>http://www.rightedgesystems.com/forums/Topic3828-11-1.aspx</link><description>&lt;FONT size=2&gt;&lt;P&gt;Suppose a bought position rises over time such that you would like to establish a trailing stop to sell, but not if there is already some form of a sell-type order pending (from a previously handled trigger). Or vice-versa. I'm trying to figure out how to establish either a SetProfitTarget or a trailing stop, but not if the other is already in force.&lt;/P&gt;&lt;P&gt;Is there status information about outstanding order(s) against a position, given the posID? Perhaps this situation is such that good use could be made of the 'tag' property, to keep track of what order is outstanding? Can more than one order at a time be outstanding, or does submitting an order cause an outstanding order to be canceled?&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 18 Oct 2007 07:25:48 GMT</pubDate><dc:creator>phg</dc:creator></item><item><title>IB forex symbol names</title><link>http://www.rightedgesystems.com/forums/Topic3346-11-1.aspx</link><description>Okay, this should be easy, but I've failed on every count. What is the proper symbol naming convention for forex pairs when connecting to Interactive Brokers?&lt;br&gt;&lt;br&gt;GBPCHF&lt;br&gt;GBP.CHF&lt;br&gt;GBP/CHF&lt;br&gt;&lt;br&gt;Everything comes up unknown. I know the data connection to IB is good (I can easily retrieve stocks).</description><pubDate>Mon, 13 Aug 2007 23:30:17 GMT</pubDate><dc:creator>jthorne</dc:creator></item><item><title>Stop Orders in Paper Broker</title><link>http://www.rightedgesystems.com/forums/Topic2370-11-1.aspx</link><description>Stop orders in the Paper Broker do not seem to work correctly. It seems to me that it will take the last traded price of the last bar as the stop level irrespective of what you place in "limit" in SystemData.OpenPosition.&lt;/P&gt;&lt;P&gt;Also orders that get filled in the Paper Broker are not updated in the Live System window until the start of the next bar.&lt;/P&gt;&lt;P&gt;And lastly, how do you place a StopLimit order? There does not seem to be any place to pass a stop level and a limit level.</description><pubDate>Mon, 30 Apr 2007 22:37:03 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>Sell at limit order</title><link>http://www.rightedgesystems.com/forums/Topic2632-11-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;This seems a dumb question to ask, but I havent been able to find a reference in documentation or an example strategy that does it.&lt;/P&gt;&lt;P&gt;How do I do a sell at limit in c#?&lt;/P&gt;&lt;P&gt;I can see OpenPosition() can have an order type of limit, but ClosePosition() is at market only.</description><pubDate>Sun, 03 Jun 2007 08:39:34 GMT</pubDate><dc:creator>Jones</dc:creator></item><item><title>Live System does not place order</title><link>http://www.rightedgesystems.com/forums/Topic1793-11-1.aspx</link><description>I tried to run the following trading system in the live system:&lt;br&gt;&lt;br&gt;using System;&lt;br&gt;using System.Drawing;&lt;br&gt;using RightEdge.Common;&lt;br&gt;using System.Collections.Generic;&lt;br&gt;using RightEdge.Indicators;&lt;br&gt;&lt;br&gt;public class SystemMain : SystemBase&lt;br&gt;{&lt;br&gt;    public override void Startup()&lt;br&gt;    {&lt;br&gt;        // Set system wide options here&lt;br&gt;&lt;br&gt;        // Here is your profit target value&lt;br&gt;         this.SystemData.ProfitTarget = 0.04;&lt;br&gt;        // Here is your time out exit value.&lt;br&gt;        // Change this to 0 for no time-out&lt;br&gt;         this.SystemData.BarCountExit = 7;&lt;br&gt;&lt;br&gt;        // Set up indicators here&lt;br&gt;        Indicators["BBL"].CreateIndicator(new BollingerBandLower(14, 1.9));&lt;br&gt;        Indicators["BBL"].SetInputs(BarElement.Close);&lt;br&gt;        Indicators["BBL"].SeriesColor = Color.Red;&lt;br&gt;        Indicators["BBL"].AddToCharts();&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    public override void NewSymbolBar(Symbol symbol, BarData bar)&lt;br&gt;    {&lt;br&gt;        ISeries bbLower = Indicators["BBL"][symbol];&lt;br&gt;        double targetPrice = bbLower[bbLower.Count - 1];&lt;br&gt;		string id = string.Empty;&lt;br&gt;		string des = string.Empty;&lt;br&gt;        //this.SystemData.OpenPosition(symbol, PositionType.Long, OrderType.Limit ,out id targetPrice);&lt;br&gt;		this.PositionManager.OpenPosition(symbol, PositionType.Long, OrderType.Limit, targetPrice, 0, des, id );&lt;br&gt;    }&lt;br&gt;}&lt;br&gt;&lt;br&gt;I use IB Paper Trader. Live System Bars = 20&lt;br&gt;&lt;br&gt;It works fine in simulation mode.&lt;br&gt;&lt;br&gt;Thanks</description><pubDate>Fri, 23 Mar 2007 17:02:42 GMT</pubDate><dc:creator>kd7038</dc:creator></item><item><title>Duplicate fills reported in Paper Broker</title><link>http://www.rightedgesystems.com/forums/Topic2371-11-1.aspx</link><description>If you set PositionManager.SetProfitTarget and PositionManager.SetStopLoss at the same time in the Paper Broker and then one of the orders is hit, you get a duplicate notification in the Closed Positions tab. Here is example code.&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Public&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Overrides&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; OnPositionTrade(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; trade &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; RightEdge.Common.Trade, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; pos &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; RightEdge.Common.Position, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; state &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; RightEdge.Common.Position.State)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;MyBase&lt;/FONT&gt;&lt;FONT size=2&gt;.OnPositionTrade(trade, pos, state)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; OnePoint &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Double&lt;/FONT&gt;&lt;FONT size=2&gt; = pos.Symbol.SymbolInformation.TickSize&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; LongProfitTarget &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Double&lt;/FONT&gt;&lt;FONT size=2&gt; = trade.Price + (3 * OnePoint)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; LongStopLevel &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Double&lt;/FONT&gt;&lt;FONT size=2&gt; = trade.Price - (3 * OnePoint)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Set Profit Target&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; pos.PositionType = PositionType.Long &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;And&lt;/FONT&gt;&lt;FONT size=2&gt; state = Position.State.Open &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;PositionManager.SetProfitTarget(pos.PosID, LongProfitTarget, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Set Stop Loss&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; pos.PositionType = PositionType.Long &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;And&lt;/FONT&gt;&lt;FONT size=2&gt; state = Position.State.Open &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;PositionManager.SetStopLoss(pos.PosID, LongStopLevel, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 01 May 2007 02:13:48 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>Broker Service</title><link>http://www.rightedgesystems.com/forums/Topic1203-11-1.aspx</link><description>I have started building a Broker Service and have a few questions.&lt;/P&gt;&lt;P&gt;1. Could you explain to me what the purpose of AddOrderUpdatedDelegate, AddPositionAvailableDelegate, RemoveOrderUpdatedDelegate, RemovePositionAvailableDelegate is. I couldn't really work out what I was supposed to be doing here from the sample.&lt;/P&gt;&lt;P&gt;2. My Broker does not have a function to return the cash in the account for GetBuyingPower. Should I just set this to 0, or will that stop orders going through? (in which case I guess I would set it to 10,000,000 or something like that)&lt;/P&gt;&lt;P&gt;3. My broker API only allows for limit and market orders to be placed. Am I correct in saying that this means that when I write a strategy in RE, that whilst I can use stop orders for back testing, that when I switch to live trading I will need to change my code to handle the stop from within RE. I am assuming that when a stop order is generated by a strategy in RE that it is sent directly to the broker for monitoring within the broker software, rather than being moinitored by RE and released as a market order when the level is hit. (What I am getting at here is, is the functionality of the BrokerOrderType enumeration members handled by RE, or does your broker software need to be able to handle this functionality?)&lt;/P&gt;&lt;P&gt;4. Really just a comment here, but I thought the BrokerTransactionType enumeration members names to be a bit confusing (Buy = Buy, Short = Sell, Sell = Close long, Cover = close short). Would have made more sense to have something like, Buy, Sell, ExitLong, ExitShort.</description><pubDate>Mon, 19 Feb 2007 03:01:35 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>PositionManager.SetStopLoss</title><link>http://www.rightedgesystems.com/forums/Topic2384-11-1.aspx</link><description>If you use PositionManager.SetStopLoss in the Paper Broker it generates an order of type StopLimit. I think this should be an order of type Stop.</description><pubDate>Thu, 03 May 2007 02:55:48 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>Cancel Orders</title><link>http://www.rightedgesystems.com/forums/Topic2358-11-1.aspx</link><description>I am having trouble with cancelling an order. The bit I am having trouble with is tracking the order ID. Lets say I am running a system on a number of symbols, I place an order to buy on stop, and the next bar I wish to cancel the order. How do I get the orderID for that order? If I call PositionManager.GetPendingOrdersForPosition(PosID) I need the PosID, so I tried setting a PosID in SystemData.OpenPosition and using that, but when I run a simulation I get the error message that the PosID has already been used. If I let RE assign a PosID in SystemData.OpenPosition how would I know what PosID goes with the order I am trying to cancel. I am sure there is a simple solution but I am not seeing it at the moment.</description><pubDate>Thu, 26 Apr 2007 22:51:23 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>Live System Window</title><link>http://www.rightedgesystems.com/forums/Topic2068-11-1.aspx</link><description>When an order is input to the Live System window the Limit Price column is formatted as $xx.xx. The format needs to be changed as not all prices are in dollars and cents. Also if a price has more than two decimal places it is being rounded to two at the moment.&lt;/P&gt;&lt;P&gt;Thanks.</description><pubDate>Wed, 11 Apr 2007 02:34:24 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>Orders and order management</title><link>http://www.rightedgesystems.com/forums/Topic1772-11-1.aspx</link><description>I think a tutorial on order placement and management would be useful. It has taken me quite a while to work out how to do things. Most of the systems uploaded on the site simply place buy orders at market and nothing else. Also I am finding some of the terminology used a little unclear.&lt;/P&gt;&lt;P&gt;For example if I place an order to buy on stop just above the market using systemdata.openposition I will now have a working order in the broker. I only want to have this order placed once. Does the "Max open" field in the Position Management section of the system properties stop this order from being placed again when the next bar completes (assuming I set it to 1) ? There are currently no open positions but if it lets it go through there are going to be more than one. &lt;/P&gt;&lt;P&gt;How do I check what orders are currently being worked in the broker? I think it might be PositionManager.GetPendingOrdersForPosition or .GetPendingPositions. What is the difference between these two functions?</description><pubDate>Thu, 22 Mar 2007 00:06:37 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>Modify Order method</title><link>http://www.rightedgesystems.com/forums/Topic1776-11-1.aspx</link><description>Any thoughts on having the ability to modify a working order. As things stand at the moment I think you need to cancel the order and then place a new one. There are a couple of drawbacks doing it this way. Firstly if the order has been partially filled then there is some extra work involved in getting the unfilled quantity in order to place the new order. Secondly, if you are trading a deep market you may be sitting in a queue waiting to get done, and by cancelling the order and placing a new one (say if you wanted to alter the quantity of the order) you lose your spot in the queue and go to the back of the line. I don't think it is anything that is urgent, but it would probably warrent doing sometime in the future.</description><pubDate>Thu, 22 Mar 2007 06:32:02 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>Commissions</title><link>http://www.rightedgesystems.com/forums/Topic1495-11-1.aspx</link><description>The commission calculation on backtesting on Yahoo historical data is the cat's meow. Nice work.&lt;/P&gt;&lt;P&gt;-Pete</description><pubDate>Wed, 07 Mar 2007 19:28:02 GMT</pubDate><dc:creator>phg</dc:creator></item><item><title>Symbol Open Time/ Close Time</title><link>http://www.rightedgesystems.com/forums/Topic1401-11-1.aspx</link><description>I am building a broker plugin for a broker that only supports limit and market orders through its API, so I am handling other order types myself in the plugin. To handle market on close or market on open orders I need to get the open and close times for a symbol. Any suggestions on how I could do this?</description><pubDate>Wed, 28 Feb 2007 18:47:35 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>Supported Broker plans</title><link>http://www.rightedgesystems.com/forums/Topic1402-11-1.aspx</link><description>Just out of interest I was wondering what brokers you plan to support in the future. In terms of wide appeal probably PATS and Trading Technologies would be my suggestions. I use EccoPro (&lt;A href="http://www.eccoware.com"&gt;www.eccoware.com&lt;/A&gt;) and have built to their API but it would be nice to know there are some alternatives available. Also if you do plan to add any brokers, any ideas on when you plan to do this?</description><pubDate>Wed, 28 Feb 2007 19:01:34 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>OrderType and BrokerOrderType</title><link>http://www.rightedgesystems.com/forums/Topic1228-11-1.aspx</link><description>Just noticed that the OrderType enumeration and the BrokerOrderType enumeration have different members. OrderType has Market, MarketOnOpen, MarketOnClose, Limit and LimitOnClose, whereas BrokerOrderType also has PeggedToMarket, Stop, StopLimit, and TrailingStop.&lt;/P&gt;&lt;P&gt;Currently using the OpenPositionMethod I would not be able to place PeggedToMarket, Stop, StopLimit and TrailingStop orders. It looks as though the OrderType enumeration has not been updated to include these order types - is this correct?</description><pubDate>Thu, 22 Feb 2007 02:38:43 GMT</pubDate><dc:creator>BigBerner</dc:creator></item><item><title>New methods added to IService Interface</title><link>http://www.rightedgesystems.com/forums/Topic1377-11-1.aspx</link><description>We have added three new methods to the IService interface.  These methods allow a service to define various custom settings, and to display a dialog to modify them.  They were added in response to feedback that services may need more settings than a server address, port, username, and password.  They were also added to allow commission settings to be specified for the paper trade broker.&lt;P&gt;Here are the three methods:&lt;/P&gt;&lt;P&gt;[code]&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;bool&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; HasCustomSettings();&lt;BR&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;FONT size=2&gt; ShowCustomSettingsForm(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ref&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SerializableDictionary&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; settings);&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;FONT size=2&gt; Initialize(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SerializableDictionary&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; settings);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;&lt;FONT size=2&gt;[/code]&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;If you have written a service plugin, you will need to add these three methods.  If you do not need to use custom settings in your service, return false from HasCustomSettings() and ShowCustomSettingsForm(), and return true from Initialize().&lt;/P&gt;&lt;P&gt;If you would like to use custom settings, then return true from HasCustomSettings().  This will enable the "Other Settings..." button in the service setup dialog for your plugin.  When this button is pressed, ShowCustomSettingsForm() will be called.  You should then show a dialog allowing the settings to be changed.  If the user accepts the changes made in your dialog box, you should return true, and the settings dictionary that was passed in should reflect the updated settings.  If the user cancels, return false.  The Initialize() method will be called just after your plugin is created, giving you access to the current custom settings.&lt;/P&gt;&lt;P&gt;The settings dictionary that is passed to you will be empty the if the service has been created and the user hasn't set up the custom settings yet.  Also, if you want to store some type of data besides a string, you will have to convert it back and forth.  Here is some sample code from the Paper trader which shows how you can handle these issues.&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt; _flatCommission = 0.0;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt; _perShareCommission = 0.0;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt; _minCommission = 0.0;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt; _maxCommission = 0.0;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt; &lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;virtual&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;FONT size=2&gt; HasCustomSettings()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;virtual&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;FONT size=2&gt; ShowCustomSettingsForm(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ref&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SerializableDictionary&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; settings)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;PaperTraderSettings&lt;/FONT&gt;&lt;FONT size=2&gt; dlg = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;PaperTraderSettings&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; val;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (settings.TryGetValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"FlatCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; val))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;dlg.FlatCommission = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt;.Parse(val);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (settings.TryGetValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"PerShareCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; val))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;dlg.PerShareCommission = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt;.Parse(val);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (settings.TryGetValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"MinCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; val))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;dlg.MinCommission = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt;.Parse(val);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (settings.TryGetValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"MaxCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; val))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;dlg.MaxCommission = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt;.Parse(val);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (dlg.ShowDialog() == System.Windows.Forms.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;DialogResult&lt;/FONT&gt;&lt;FONT size=2&gt;.OK)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;settings[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"FlatCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;] = dlg.FlatCommission.ToString();&lt;/P&gt;&lt;P&gt;settings[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"PerShareCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;] = dlg.PerShareCommission.ToString();&lt;/P&gt;&lt;P&gt;settings[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"MinCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;] = dlg.MinCommission.ToString();&lt;/P&gt;&lt;P&gt;settings[&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"MaxCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;] = dlg.MaxCommission.ToString();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;virtual&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;bool&lt;/FONT&gt;&lt;FONT size=2&gt; Initialize(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SerializableDictionary&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; settings)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;_flatCommission = 0.0;&lt;/P&gt;&lt;P&gt;_perShareCommission = 0.0;&lt;/P&gt;&lt;P&gt;_minCommission = 0.0;&lt;/P&gt;&lt;P&gt;_maxCommission = 0.0;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;FONT size=2&gt; val;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (settings.TryGetValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"FlatCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; val))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (!&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt;.TryParse(val, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; _flatCommission))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;lastError = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"FlatCommission was not a number."&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (settings.TryGetValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"PerShareCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; val))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (!&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt;.TryParse(val, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; _perShareCommission))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;lastError = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"PerShareCommission was not a number."&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (settings.TryGetValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"MinCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; val))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (!&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt;.TryParse(val, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; _minCommission))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;lastError = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"MinCommission was not a number."&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (settings.TryGetValue(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"MaxCommission"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; val))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;if&lt;/FONT&gt;&lt;FONT size=2&gt; (!&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;double&lt;/FONT&gt;&lt;FONT size=2&gt;.TryParse(val, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; _maxCommission))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;P&gt;lastError = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"MaxCommission was not a number."&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;return&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;true&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Daniel</description><pubDate>Mon, 26 Feb 2007 21:41:22 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>Position management error handling</title><link>http://www.rightedgesystems.com/forums/Topic926-11-1.aspx</link><description>We are in the process of rewriting our position manager to be much more flexible, to support position resizing, pyramiding, and partial fills.  We want it to be as robust as possible.  So right now I am considering a "worst-case scenario" which will hopefully never happen to you, but if it does we want to handle it in the best way possible.  The issue is what to do if the position size goes "negative." &lt;P&gt;There might be various ways that this could happen, but here is one scenario.  You open a position with 100 shares and a profit target.  The profit target is implemented as a limit order to sell 100 shares.  Some time later, you decide to sell off half of the position.  So the order is sent to sell 50 shares.  Normally what would happen is that when you receive confirmation that the 50 shares have been sold, the profit target limit order will be canceled and a new one will be sent for 50 shares instead of 100.  But it is possible that the limit price would hit between the time that you send the sell order for 50 shares and the time that you receive the message that the shares have been sold and are able to resize the profit target order.  Since you sold 150 shares from a position that only had 100 shares, you are now short 50 shares.&lt;/P&gt;&lt;P&gt;At first glance it might seem like this situation is avoidable by resizing the profit target order before sending the order to sell 50 shares.  But you might want to sell the 50 shares with a limit order, and in that case you don't know if it will execute until you receive notification that it went through.&lt;/P&gt;&lt;P&gt;So, if something like this happens, what should the position manager do?  Right now I am thinking that it should just use a market order to get you back to zero shares.  This seems like what you would do anyway if you ended up with an unwanted position, and I'm not sure what else an automated system could do.&lt;/P&gt;&lt;P&gt;We welcome any feedback you may have.</description><pubDate>Mon, 15 Jan 2007 21:45:36 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>Virtual broker</title><link>http://www.rightedgesystems.com/forums/Topic316-11-1.aspx</link><description>We've completed the initial development of a virtual broker and integrated it with RE.  This puts us in a very good position for implementing real brokers.  Since the virtual broker acts like any other broker to RE, the plumbing is in place and we're pretty excited about this development.  Will keep you posted.</description><pubDate>Tue, 17 Oct 2006 08:44:34 GMT</pubDate><dc:creator>billb</dc:creator></item><item><title>Is the Broker Interface for Interactive Brokers Available for RightEdge?</title><link>http://www.rightedgesystems.com/forums/Topic202-11-1.aspx</link><description>I would like to know whether the current beta release of RightEdge includes a functioning broker order interface to Interactive Brokers?&lt;P&gt;Is it possible to generate orders to IB from RightEdge at this time?&lt;/P&gt;&lt;P&gt;Are there any examples or code snippets on how to generate realtime orders to a broker from a RightEdge trading system?&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Mon, 14 Aug 2006 11:11:48 GMT</pubDate><dc:creator>steinhausq</dc:creator></item></channel></rss>