﻿<?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, 08 Feb 2012 15:14:50 GMT</lastBuildDate><ttl>20</ttl><item><title>Stoploss handling</title><link>http://www.rightedgesystems.com/forums/Topic13597-11-1.aspx</link><description>If I open a position using OpenPosition(settings) and specify a stop this will generate a  stop market  order once the position has opened.  &lt;br&gt;&lt;br&gt;I want to replace this order with a stop limit order so that the order can sit natively at the exchange. &lt;br&gt;&lt;br&gt;1. is there any way that I can define the position stop as a stop limit when I define and submit OpenPosition?&lt;br&gt;&lt;br&gt;2. if 1. is not possible can I modify the stop order once the position is opened or do I need to cancel it and create a replacement order ?&lt;br&gt;&lt;br&gt;thanks &lt;br&gt;Robert&lt;br&gt;&lt;br&gt;</description><pubDate>Thu, 10 Nov 2011 23:22:10 GMT</pubDate><dc:creator>tickbytick</dc:creator></item><item><title>API Plugin for Kyte Group</title><link>http://www.rightedgesystems.com/forums/Topic13441-11-1.aspx</link><description>hello to all.&lt;br&gt;&lt;br&gt;My question is whether RE can connect and interact with the Kyte Group. &lt;br&gt;[url]http://www.kytegroup.com[/url]&lt;br&gt;&lt;br&gt;Thank you in advance</description><pubDate>Tue, 20 Sep 2011 04:47:57 GMT</pubDate><dc:creator>Christos</dc:creator></item><item><title>How does RE choose which Limit Orders to fill in backtest?</title><link>http://www.rightedgesystems.com/forums/Topic13327-11-1.aspx</link><description>Assume that you have provided limit orders for 100 stocks after close for the next day. But your available cash only allows 10 position to be filled and the next day 50 of those limit orders actually will hit sometime during the day. Also we only have daily bar data, so we don't have a way of knowing the realistic order of executions.&lt;br&gt;&lt;br&gt;How does RE choose (during backtest) which 10 among those 50 to fill? Is it random or there is some sort of bias there?&lt;br&gt;&lt;br&gt;Thanks.&lt;br&gt;Erk</description><pubDate>Wed, 06 Jul 2011 12:02:30 GMT</pubDate><dc:creator>ErkSubasi</dc:creator></item><item><title>RE double counting some partial fills resulting in positions out of sync with IB and resulting in overfills</title><link>http://www.rightedgesystems.com/forums/Topic13319-11-1.aspx</link><description>Hello,&lt;BR&gt;&lt;BR&gt;Overall I must say I am impressed with the RightEdge.  I am having a big problem with positions getting out of sync with IB and resulting overfills -  this seems to happen on about 1 of every 10 trades with IB.  It appears that RE occasionally double-counts partial fills.  I turned on the broker logging in the latest v36 build.  Below are the order execution messages which appear to tell the story.  I initiated a trade to sell 321 TWC.  One of the 100 shares partial fills was double-counted by RE (see highlighted line) at a time when the current fill size was 317/321, resulting in RE thinking my total position size was 417 when it was actually 321.  The log messages then start talking about an untracked order.  This then results in an overfill as when I go to close the position, RE says the size is 417, so I close 417 and wind up long 96 which is a trade I'd rather bet against and I wind up paying extra commissions and punitive commissions on the oddlot &amp;lt; 100 shares.&lt;/P&gt;&lt;P&gt;How do we fix this?  I have read a bunch of posts about overfill issues but I am unclear how best to fix this.  In some of those posts it almost seems that the definition of a position is getting confused, it should really be defined by there being one and only one position for each unique symbol, i.e. +100 AAPL and -50AAPL is not two positions, the only "position" for AAPL is +50.  I also tried using the code below, below the messages but I'm not sure if it is helping.  I attached the log file including all messages for that symbol.  I look forward to your diagnosis.&lt;/P&gt;&lt;P&gt;Time Symbol Order Position Event Details&lt;BR&gt;11:34:15 TWC 683 9 ExecDetails 20110629  11:34:13 Sold Size: 100 Price: 77.73&lt;BR&gt;11:34:15 TWC 683 9 ExecDetails Partial fill: total 100/321&lt;BR&gt;11:34:25 TWC 683 9 ExecDetails 20110629  11:34:23 Sold Size: -100 Price: 77.73&lt;BR&gt;11:34:25 TWC 683 9 ExecDetails ### Execution Ignored - Negative Fill&lt;BR&gt;11:34:25 TWC 683 9 ExecDetails 20110629  11:34:23 Sold Size: 100 Price: 77.73&lt;BR&gt;11:34:25 TWC 683 9 ExecDetails Partial fill: total 200/321&lt;BR&gt;11:34:35 TWC 683 9 ExecDetails 20110629  11:34:34 Sold Size: 100 Price: 77.73&lt;BR&gt;11:34:35 TWC 683 9 ExecDetails Partial fill: total 300/321&lt;BR&gt;11:34:36 TWC 683 9 ExecDetails 20110629  11:34:35 Sold Size: 17 Price: 77.73&lt;BR&gt;11:34:36 TWC 683 9 ExecDetails Partial fill: total 317/321&lt;BR&gt;&lt;FONT style="BACKGROUND-COLOR: #ffff11"&gt;11:34:37 TWC 683 9 ExecDetails 20110629  11:34:35 Sold Size: 100 Price: 77.73&lt;BR&gt;&lt;/FONT&gt;11:34:45 TWC 683 n/a ExecDetails: untracked order 20110629  11:34:44 Sold Size: -317 Price: 77.73&lt;BR&gt;11:34:46 TWC 683 n/a ExecDetails: untracked order 20110629  11:34:44 Sold Size: 317 Price: 77.73&lt;BR&gt;11:34:54 TWC 683 n/a ExecDetails: untracked order 20110629  11:34:53 Sold Size: 4 Price: 77.73&lt;BR&gt;11:34:55 TWC 683 n/a ExecDetails: untracked order 20110629  11:34:53 Sold Size: -321 Price: 77.73&lt;BR&gt;11:34:55 TWC 683 n/a ExecDetails: untracked order 20110629  11:34:53 Sold Size: 321 Price: 77.73&lt;BR&gt;12:00:03 TWC 695 9 ExecDetails 20110629  12:00:01 Bought Size: 417 Price: 77.81&lt;BR&gt;12:00:03 TWC 695 n/a ExecDetails: untracked order 20110629  12:00:01 Bought Size: -417 Price: 77.81&lt;BR&gt;12:00:03 TWC 695 n/a ExecDetails: untracked order 20110629  12:00:01 Bought Size: 417 Price: 77.81&lt;BR&gt;&lt;/P&gt;&lt;P&gt;&lt;BR&gt;public override void OrderFilled(Position position, Trade trade)&lt;BR&gt;{&lt;BR&gt; // This method is called when an order is filled&lt;/P&gt;&lt;P&gt;        // if my position is now 0, then cancel any other orders&lt;BR&gt;        if (position.CurrentSize == 0)&lt;BR&gt;        {&lt;BR&gt;            // if there are still pending orders, cancel them&lt;BR&gt;            if (position.Orders.Count &amp;gt; 0)&lt;BR&gt;            {&lt;BR&gt;                foreach (Order pendingOrders in position.Orders)&lt;BR&gt;                {&lt;BR&gt;                    pendingOrders.CancelOrder();&lt;BR&gt;                    TradingSystem.WriteMessage("Pending Order cancel since position now flat for " + pendingOrders.Symbol);&lt;BR&gt;                }&lt;BR&gt;            }&lt;BR&gt;        }&lt;BR&gt;}</description><pubDate>Wed, 29 Jun 2011 17:18:41 GMT</pubDate><dc:creator>tfconrad</dc:creator></item><item><title>GoodTillCancelled</title><link>http://www.rightedgesystems.com/forums/Topic10076-11-1.aspx</link><description>Deep inside my Broker Plugin I can read and react on BrokerOrder.GoodTillCancelled.&lt;br&gt;&lt;br&gt;But how do I (re-)set this flag in a script.&lt;br&gt;&lt;br&gt;I use &lt;br&gt;OpenPosition(PositionSettings) for new positions and&lt;br&gt;SubmitOrder(OrderSettings) for existing positions. None of these allows access to the GoodTillCancelled flag.&lt;br&gt;&lt;br&gt;Ideas?</description><pubDate>Wed, 25 Nov 2009 05:44:24 GMT</pubDate><dc:creator>DrKoch</dc:creator></item><item><title>HandlePositionOverfilled on IB Live System</title><link>http://www.rightedgesystems.com/forums/Topic13080-11-1.aspx</link><description>I received the following exception today but was unable to find the cause?  The audit trail shows a partial fill of 22 followed by a final fill of 43 on the initial sell limit of 65 while the log from position manager shows a partial fill of 22 followed by a partial fill of 44 after which the exception was thrown.  Also, where/how can this exception be handled?&lt;br&gt;&lt;br&gt;A Sell order (307: Limit Sell CNX  @ 50.37 87/65: 22@50.37, 22@50.37, 43@50.37 - Filled) with a size of 65 was filled on position ID 57 with a size of 21.&lt;br&gt;   at RightEdge.Common.PositionManager.HandlePositionOverfilled(PositionData pos, PositionState posState, BrokerOrder order, Fill fill, TradeType tradeType, String description)&lt;br&gt;   at RightEdge.Common.PositionManager.OnOrderFilled(BrokerOrder order, Fill fill, PositionData pos, PositionState posState, TradeOrder tradeOrder)&lt;br&gt;   at RightEdge.Common.PositionManager.broker_OrderUpdated(BrokerOrder brokerOrder, Fill fill, String information)&lt;br&gt;   at RightEdge.Shared.BrokerWrapper.&lt;&gt;c__DisplayClass3.&lt;broker_orderUpdated&gt;b__0(Object )&lt;br&gt;   at RightEdge.Shared.CallbackStub.DoCallback()&lt;br&gt;&lt;br&gt;Thanks, Duane</description><pubDate>Wed, 13 Apr 2011 17:21:08 GMT</pubDate><dc:creator>dwebber</dc:creator></item><item><title>Detecting partial fills</title><link>http://www.rightedgesystems.com/forums/Topic11892-11-1.aspx</link><description>My system can submit order to buy or short up to 4 contracts - when there is more than one very often in a live situation these go through as 2,3, or even 4 partial fills&lt;br&gt;to complete the 4 contracts.  &lt;br&gt;&lt;br&gt;In the ordefilled routine I'm checking to see the current position size to place a stop order.  However in this situation the curent size can be less than 4 due to the partial fills&lt;br&gt;so the stop order gets placed with a lower number of contracts than desired.  &lt;br&gt;&lt;br&gt;How can I code around this ?&lt;br&gt;</description><pubDate>Tue, 06 Jul 2010 11:46:28 GMT</pubDate><dc:creator>blousetrader</dc:creator></item><item><title>Combination Orders</title><link>http://www.rightedgesystems.com/forums/Topic12976-11-1.aspx</link><description>Is there a way to execute combination orders both in simulation and live?  It would be ideal to have the execution supported in the TWS plugin: http://ibkb.interactivebrokers.com/node/1683&lt;br&gt;&lt;br&gt;Thanks, Duane</description><pubDate>Wed, 16 Mar 2011 13:48:08 GMT</pubDate><dc:creator>dwebber</dc:creator></item><item><title>Restrict shares to percent of volume for backtesting</title><link>http://www.rightedgesystems.com/forums/Topic12604-11-1.aspx</link><description>Is there a way to restrict the number of shares executed to a percent of the volume for a bar during backtesting?  For example, if the volume for the [i]next [/i]bar is 10,000 (unknown at the time the order is placed) and % = 40%, then a max of 4,000 shares would be executed regardless of the amount set in the position manager (leading to a partial fill).&lt;br&gt;&lt;br&gt;Thanks, Duane</description><pubDate>Sun, 28 Nov 2010 15:33:52 GMT</pubDate><dc:creator>dwebber</dc:creator></item><item><title>Stop Loss and Take profit doesn't show up on Future / Forex</title><link>http://www.rightedgesystems.com/forums/Topic12616-11-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;For some reason, the stop loss and take profit that I set doesn't show up on Interactive Broker for forex / future. The entry order executed successfully.&lt;br&gt;&lt;br&gt;I found this warning though. Not sure what that means.&lt;br&gt;[code]Position manager order updated: 60: Limit Sell EUR/USD  @ 1.3 0/20000 - Submitted IB error/warning code 2109: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed.&lt;br&gt;Position manager order updated: 61: Stop Sell EUR/USD  @ 1.2 0/20000 - Submitted IB error/warning code 2109: Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed.&lt;br&gt;Live system window pending ticks: 1&lt;br&gt;[/code]&lt;br&gt;&lt;br&gt;The code is written as follow:&lt;br&gt;&lt;br&gt;[code]public class MySymbolScript : MySymbolScriptBase {&lt;br&gt;	private bool isOpened = false;&lt;br&gt;	public override void Startup() {&lt;br&gt;	}&lt;br&gt;&lt;br&gt;	public override void NewTick(BarData partialBar, TickData tick) {&lt;br&gt;		// Put your trading code here&lt;br&gt;		if (!isOpened)&lt;br&gt;		{&lt;br&gt;			Position open_position = this.PositionManager.OpenPosition(this.Symbol, PositionType.Long, OrderType.Market, -1, 100, "TestBuy");&lt;br&gt;			open_position.SetProfitTarget(1.3, TargetPriceType.AbsolutePrice);&lt;br&gt;			open_position.SetStopLoss(1.2, TargetPriceType.AbsolutePrice);&lt;br&gt;			isOpened = true;&lt;br&gt;		}&lt;br&gt;	}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;	public override void NewBar()&lt;br&gt;	{&lt;br&gt;	}&lt;br&gt;&lt;br&gt;	public override void OrderFilled(Position position, Trade trade)&lt;br&gt;	{&lt;br&gt;		// This method is called when an order is filled&lt;br&gt;	}&lt;br&gt;&lt;br&gt;	public override void OrderCancelled(Position position, Order order, string information)&lt;br&gt;	{&lt;br&gt;		// This method is called when an order is cancelled or rejected&lt;br&gt;	}&lt;br&gt;}&lt;br&gt;[/code]&lt;br&gt;&lt;br&gt;Can someone point me to the right direction?</description><pubDate>Tue, 30 Nov 2010 16:02:12 GMT</pubDate><dc:creator>felixtjung</dc:creator></item><item><title>Forex order doesn't show up in InteractiveBroker</title><link>http://www.rightedgesystems.com/forums/Topic12610-11-1.aspx</link><description>Hi, I need help in setting up rightedge to trade in forex at Interactive Broker. I couldn't get it to work at all. Could someone give me instruction how to do it? or at least some link if available? It seems RightEdge tries to submit the order and IB somehow ignore it.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Felix</description><pubDate>Mon, 29 Nov 2010 16:57:34 GMT</pubDate><dc:creator>felixtjung</dc:creator></item><item><title>Cancelling partially filled order?</title><link>http://www.rightedgesystems.com/forums/Topic12570-11-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;Just to confirm something, suppose if I have an order attached to a position. Let say, the order (size=100) is already filled partially (filled size = 50). What will happen if I cancel this order? Will the partially filled "Trade" still be calculated correctly? And what would be the state of the Order (BrokerOrderState.Cancelled or BrokerOrderState.PendingCancel)?&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Felix</description><pubDate>Mon, 22 Nov 2010 02:24:04 GMT</pubDate><dc:creator>felixtjung</dc:creator></item><item><title>weird behavior</title><link>http://www.rightedgesystems.com/forums/Topic12259-11-1.aspx</link><description>When I was running backtesting, I noticed some weird behavior. Following are the data file:&lt;BR&gt;[quote]&lt;BR&gt;datetime open high low close volume&lt;BR&gt;08/24/2010 02:20:00,1061.75,1063.0,1061.75,1062.75,1340&lt;BR&gt;08/24/2010 02:25:00,1063.0,1063.0,1062.5,1063.0,254&lt;BR&gt;08/24/2010 02:30:00,1062.75,1062.75,1062.0,1062.5,1153&lt;BR&gt;(note the order is different from the bar editor)&lt;BR&gt;[/quote]&lt;BR&gt;the strategy is very simple:&lt;BR&gt;&lt;BR&gt;[code]&lt;BR&gt;public override void NewBar()&lt;BR&gt;{&lt;BR&gt;OutputMessage("onBar: "+ Bars.Current.BarStartTime);&lt;BR&gt;&lt;BR&gt;//if(Bars.Current.BarStartTime == new DateTime(2010, 8, 24, 2, 25, 0)){&lt;BR&gt;OutputMessage("shorting. ");&lt;BR&gt;OpenPosition( PositionType.Short, OrderType.Limit, 1063, 1);&lt;BR&gt;//}&lt;BR&gt;return;&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;public override void OrderFilled(Position position, Trade trade) &lt;BR&gt;{ &lt;BR&gt;OutputMessage("order filled: "+ "Pos ID = "+position.ID + " "+ "Size = " +position.CurrentSize + &lt;BR&gt;" "+position.Type+", trade: "+ trade.TransactionType+" tradesize: "+trade.Size+ " at price: "+&lt;BR&gt;trade.Price.AccountPrice +" time "+trade.FilledTime);&lt;BR&gt;} &lt;BR&gt;&lt;BR&gt;&lt;BR&gt;public override void OrderCancelled(Position position, Order order, string information) &lt;BR&gt;{ &lt;BR&gt;OutputMessage("order cancelled: "+ "Pos ID = "+position.ID + " "+ "Size = " +position.CurrentSize + &lt;BR&gt;" "+position.Type +", order: "+order.TransactionType+" "+order.OrderType+" "+order.LimitPrice);&lt;BR&gt;&lt;BR&gt;} &lt;BR&gt;[/code]&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;[highlight]The order was supposed to be filled at the 2:30:00 bar, but it's not.[/highlight]&lt;BR&gt;I can see that the limit short order was placed, because "shorting" was printed, and but it was cancelled at next bar, and not filled.&lt;BR&gt;&lt;BR&gt;if I change the code a little bit, to [highlight]take out the if statement[/highlight]:&lt;BR&gt;[code]&lt;BR&gt;public override void NewBar()&lt;BR&gt;{&lt;BR&gt;OutputMessage("onBar: "+ Bars.Current.BarStartTime);&lt;BR&gt;&lt;BR&gt;//if(Bars.Current.BarStartTime == new DateTime(2010, 8, 24, 2, 25, 0)){&lt;BR&gt;OutputMessage("shorting. ");&lt;BR&gt;OpenPosition( PositionType.Short, OrderType.Limit, 1063, 1);&lt;BR&gt;//}&lt;BR&gt;return;&lt;BR&gt;}&lt;BR&gt;[/code]&lt;BR&gt;&lt;BR&gt;or change the limit price to [highlight]1062.75[/highlight]&lt;BR&gt;&lt;BR&gt;[code]&lt;BR&gt;public override void NewBar()&lt;BR&gt;{&lt;BR&gt;OutputMessage("onBar: "+ Bars.Current.BarStartTime);&lt;BR&gt;&lt;BR&gt;if(Bars.Current.BarStartTime == new DateTime(2010, 8, 24, 2, 25, 0)){&lt;BR&gt;OutputMessage("shorting. ");&lt;BR&gt;OpenPosition( PositionType.Short, OrderType.Limit, 1062.75, 1);&lt;BR&gt;}&lt;BR&gt;return;&lt;BR&gt;}&lt;BR&gt;[/code]&lt;BR&gt;&lt;BR&gt;They all works.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;Can you help me out? Thanks.</description><pubDate>Sun, 26 Sep 2010 21:37:01 GMT</pubDate><dc:creator>rick123</dc:creator></item><item><title>AddToPosition and BarsValid</title><link>http://www.rightedgesystems.com/forums/Topic12249-11-1.aspx</link><description>I'm using "position averaging", so in my code is something like&lt;br&gt;[code]PositionManager.AddToPosition(myposition.ID, shares, OrderType.Limit, Close.Current, "Pyramide 1")[/code]&lt;br&gt;However, such order is valid for 1 bar only (!). I need (say) GTC. Is it sufficient to write &lt;br&gt;[code]Dim myOrder as Order = PositionManager.AddToPosition(myposition.ID, shares, OrderType.Limit, Close.Current, "Pyramide 1")&lt;br&gt;myOrder.BarsdValid = -1[/code]?&lt;br&gt;Seems ok in paperbroker...</description><pubDate>Sat, 25 Sep 2010 09:19:32 GMT</pubDate><dc:creator>xzajic2</dc:creator></item><item><title>Trailing stop limit orders</title><link>http://www.rightedgesystems.com/forums/Topic12150-11-1.aspx</link><description>Is it possible to create trailing stop limit order and send it to broker? My broker is IB and I'm using RE to run live system.&lt;br&gt;TRAILING STOP orders ([url=http://www.interactivebrokers.com/en/trading/orders/trailingStops.php]http://www.interactivebrokers.com/en/trading/orders/trailingStops.php[/url]) are working properly with code like this[code]PositionManager.SetTrailingStop(pos.ID, 0.01, TargetPriceType.RelativePrice)[/code]but I want to submit TRAILING STOP LIMIT orders ([url=http://www.interactivebrokers.com/en/trading/orders/trailingStopLimit.php]http://www.interactivebrokers.com/en/trading/orders/trailingStopLimit.php[/url])&lt;br&gt;Is there a way to do this via RE? If yes, could you provide a simple example?&lt;br&gt;I love limit orders, because market orders often produces very different paper vs live results :)</description><pubDate>Wed, 01 Sep 2010 06:07:58 GMT</pubDate><dc:creator>xzajic2</dc:creator></item><item><title>Round lots</title><link>http://www.rightedgesystems.com/forums/Topic12121-11-1.aspx</link><description>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.&lt;P&gt;My open statement is simply:&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;/P&gt;&lt;P&gt;OpenPosition(PositionType.Long, OrderType.Market);&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;Is this a known bug?&lt;P&gt;UPDATE: This happens not only in my system, but in the Bollinger Penetration system (with a 30 bar exit):&lt;P&gt; &lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;#region&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; Using statements&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; System.Drawing;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; System.Linq;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; RightEdge.Common;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; RightEdge.Common.ChartObjects;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; RightEdge.Indicators;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;#endregion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;#region&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; System class&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;class&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; MySystem : MySystemBase&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;override&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;void&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; Startup()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;            &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt"&gt;// Perform initialization or set system wide options here&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;#endregion&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;class&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; MySymbolScript : MySymbolScriptBase&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;      &lt;/SPAN&gt;Frequency DailyFreq;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;      &lt;/SPAN&gt;BollingerBandLower bbl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;override&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;void&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; Startup()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;      &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;            &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt"&gt;// Perform initialization here. &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;            &lt;/SPAN&gt;SystemData.CreateTicksFromBars = &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;false&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;        &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt"&gt;//DailyFreq = GetFrequency(BarFrequency.Daily);&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;        &lt;/SPAN&gt;bbl = &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;new&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; BollingerBandLower(&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: purple; FONT-SIZE: 10pt"&gt;14&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;, &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: purple; FONT-SIZE: 10pt"&gt;1.5&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;            &lt;/SPAN&gt;bbl.SetInputs(Close);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;      &lt;/SPAN&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;      &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;override&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;void&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; NewBar()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;      &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;            &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt"&gt;// Put your trading code here&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;            &lt;/SPAN&gt;OpenPosition(PositionType.Long, OrderType.Limit, bbl.Current);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;      &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;override&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;void&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; OrderFilled(Position position, Trade trade)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;            &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt"&gt;// This method is called when an order is filled&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;public&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;override&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;void&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; OrderCancelled(Position position, Order order, &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt"&gt;string&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; information)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;            &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt"&gt;// This method is called when an order is cancelled or rejected&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt;}&lt;/SPAN&gt;</description><pubDate>Wed, 25 Aug 2010 11:20:54 GMT</pubDate><dc:creator>Steve2008</dc:creator></item><item><title>Trades triggering outside RTH or not</title><link>http://www.rightedgesystems.com/forums/Topic11850-11-1.aspx</link><description>Is there a way to configure the orders to go through to TWS as triggerable outside RTH.  In TWS there's a checkbox &lt;br&gt;for futures presets which I have ticked but orders going through from RE apparently aren't picking this up.</description><pubDate>Wed, 30 Jun 2010 15:12:25 GMT</pubDate><dc:creator>blousetrader</dc:creator></item><item><title>Attempted to open position during the lead bar period</title><link>http://www.rightedgesystems.com/forums/Topic12073-11-1.aspx</link><description>I have a trading system that does not require bar or ticker information at all. I have RE read a Symbol List and see if any of the symbols exist in a separate database table.&lt;br&gt;&lt;br&gt;If the symbol does, it tries to open a position. All of this occurs in the MySymbolScript.Startup() method. I am using IB as my broker and I have no real time data specified for the symbol folder.&lt;br&gt;&lt;br&gt;I have two problems:&lt;br&gt;&lt;br&gt;1. For any positions that I try to take I get this error: "Attempted to open position during the lead bar period". I have Lead Bars set to 0.&lt;br&gt;&lt;br&gt;2. After it runs and fails to send out my positions I get: "There were errors starting live data retrieval for the following symbols". &lt;br&gt;&lt;br&gt;Thanks.</description><pubDate>Thu, 19 Aug 2010 03:16:59 GMT</pubDate><dc:creator>levonbarker@gmail.com</dc:creator></item><item><title>Intraday system and trailing stop orders</title><link>http://www.rightedgesystems.com/forums/Topic11985-11-1.aspx</link><description>I'm testing some intraday 5-min trading system and I've a question. My system uses trailing stop, so I've some code like this:&lt;br&gt;&lt;br&gt;[b]PositionManager.SetTrailingStop(pos.ID, amount, TargetPriceType.RelativePrice)[/b]&lt;br&gt;&lt;br&gt;Works ok, RE sends trailing stop order to IB and the order is executed (depending of price movement, of course).&lt;br&gt;&lt;br&gt;But: if there is "pending" trailing stop order on the end of the day, I'd like to cancel it and sell EVERYTHING on CloseAtMarket. How to do this correctly? Is it sufficient to call something like &lt;br&gt;&lt;br&gt;[b]If Bars.Current.BarStartTime.Hour = 15 And Bars.Current.BarStartTime.Minute =25 Then&lt;br&gt; For Each pos As Position In OpenPositions&lt;br&gt;  pos.CloseAtMarket()&lt;br&gt; Next&lt;br&gt;End If[/b]&lt;br&gt;&lt;br&gt;or I need to cancel pending position first? Could someone provide a piece of sample code?</description><pubDate>Sun, 18 Jul 2010 05:55:58 GMT</pubDate><dc:creator>xzajic2</dc:creator></item><item><title>Order execution after IB close/PC shut down</title><link>http://www.rightedgesystems.com/forums/Topic11602-11-1.aspx</link><description>Hi&lt;/P&gt;&lt;P&gt;I am running a live system which has two exit scenarios:&lt;/P&gt;&lt;P&gt;1) 5% profit taking&lt;/P&gt;&lt;P&gt;2) two day time based exit&lt;/P&gt;&lt;P&gt;I am wondering now what happens if IB connection is broken (@ night) or if I shut down the computer after the trading session? If I start RE and IB again the other day, does RE recognize that there is a long position in the portfolio and that it needs to transmit a sell order? Does it recognize when timebased exit date is reached? Basically does the system pick up what happened in the previous day by an interruption of RE and IB? To have it fully automated is it necessary to have it run 24hrs/5ds?&lt;/P&gt;&lt;P&gt;Thks for your help</description><pubDate>Wed, 05 May 2010 14:38:37 GMT</pubDate><dc:creator>rigi583</dc:creator></item><item><title>GTC not DAY orders</title><link>http://www.rightedgesystems.com/forums/Topic11668-11-1.aspx</link><description>I've got the following code to submit a limit order.  I've set the BarsValid = -1 but they're still being&lt;br&gt;sent to TWS as DAY orders - how do i get GTC orders&lt;br&gt;&lt;br&gt;Dim ordSettings As  New OrderSettings()&lt;br&gt;ordSettings.TransactionType = TransactionType.Sell&lt;br&gt; ordSettings.BarsValid = -1&lt;br&gt; ordSettings.OrderType = OrderType.Limit&lt;br&gt; ordSettings.LimitPrice = position.EntryPrice.SymbolPrice+lim&lt;br&gt; ordSettings.Size = TradeSize/2&lt;br&gt; ordSettings.Description = "LT-1"&lt;br&gt; position.SubmitOrder(ordSettings)</description><pubDate>Thu, 20 May 2010 14:00:33 GMT</pubDate><dc:creator>blousetrader</dc:creator></item><item><title>IB paper trading: Stop Loss and Take Profit orders from OpenPosition get cancelled at the end of the day</title><link>http://www.rightedgesystems.com/forums/Topic8131-11-1.aspx</link><description>I've recently switched from back-testing to paper trading at IB. I've found that the stop loss and take profit orders associated with OpenPosition are entered as day orders. As a result, all SL and TP orders are cancelled at the end of the day. This generates non-fatal errors upon reconnection the next day, when RE checks to see if the orders are still active. It's a real pain to place all of these orders manually.&lt;br&gt;&lt;br&gt;How can I get RE to place SL and TP orders as GTC?&lt;br&gt;&lt;br&gt;One other question: RE places SL and TP orders with an attribute allowing transactions outside RTH. IB doesn't seem to allow this for SL orders. IB issues a warning and places the SL order for RTH only (fine with me, except for the warning). How can I better control this behavior? I would like to allow TP outside RTH.</description><pubDate>Fri, 10 Apr 2009 15:49:55 GMT</pubDate><dc:creator>davidS</dc:creator></item><item><title>Simulation</title><link>http://www.rightedgesystems.com/forums/Topic11586-11-1.aspx</link><description>I tried to run a backtest on S&amp;amp;P 500 Futures with Interactive Brokers Data Feeds and got this error message: "Attempted to open position during the lead bar period" Can anybody work me through how to resolve this? &lt;P&gt;Thanks</description><pubDate>Tue, 04 May 2010 15:57:39 GMT</pubDate><dc:creator>osuntok</dc:creator></item><item><title>OrderCancelled called, but orders not cancelled in IB</title><link>http://www.rightedgesystems.com/forums/Topic10894-11-1.aspx</link><description>Hi guys, my setup: RE2 b14, IB as broker, live system on 1 min bars, trading stocks.&lt;br&gt;&lt;br&gt;My problem: when I run a live system afterhours (4:30pm), immediately after a buy order is placed, the OrderCancelled() method is called with the information message "Warning: your order will not be placed at the exchange until 2010-02-18 09:30:00 US/Eastern". However, when I look in TWS, the order is still there - it never gets cancelled. My system continue running and shows no pending orders in the Live System tab. I thought that OrderCancelled() gets called only when an order is actually cancelled? Is this an error? You can try to reproduce this by simply placing a day order with IB after market close. Thank you!&lt;br&gt;&lt;br&gt;</description><pubDate>Wed, 17 Feb 2010 19:48:23 GMT</pubDate><dc:creator>Zora</dc:creator></item><item><title>Day Session only from IB</title><link>http://www.rightedgesystems.com/forums/Topic11421-11-1.aspx</link><description>Hi Everyone,&lt;br&gt;&lt;br&gt;I would like to run a trading system on Live day session only data.  This is a daily system.  How do I configure RE with IB data feed to only look at the day session data and create the bar at 9:30 in the morning instead of when the first tick occurs?&lt;br&gt;&lt;br&gt;Thanks in advance!</description><pubDate>Thu, 08 Apr 2010 09:41:17 GMT</pubDate><dc:creator>zykem</dc:creator></item><item><title>Stop Loss bug (backtesting)</title><link>http://www.rightedgesystems.com/forums/Topic10687-11-1.aspx</link><description>in last beta version of RE positions could be closed at impossible prices outside of the bar, if system by mistake gives an order with stop loss favourable than the open or current price.&lt;br&gt;&lt;br&gt;(see attach)</description><pubDate>Thu, 04 Feb 2010 07:09:25 GMT</pubDate><dc:creator>lexx</dc:creator></item><item><title>Buy Limit Orders Cancelled - IB</title><link>http://www.rightedgesystems.com/forums/Topic10446-11-1.aspx</link><description>I'm using IB TWS and RE2 build 14 on a live system.  Sell Limit orders placed via profit targets are being placed through the API (ProfitTarget set after a position has been established); however, buy limit orders placed through PositionManager.OpenPosition() are not being sent to TWS (confirmed via reviewing log and IB tech support).  It appears the positions are being cancelled within RE with the following error: "Order cancelled while disconnected".  The buy limit orders do not contain profit target or stop loss properties.&lt;br&gt;&lt;br&gt;How do I debug and/or why are the orders being cancelled?&lt;br&gt;&lt;br&gt;Thanks, Duane</description><pubDate>Fri, 08 Jan 2010 15:23:49 GMT</pubDate><dc:creator>dwebber</dc:creator></item><item><title>Oanda plugin and accounts</title><link>http://www.rightedgesystems.com/forums/Topic7055-11-1.aspx</link><description>I'm not sure where else to post this.&lt;br&gt;&lt;br&gt;I'm using the Oanda plugin developed Mark Loftis.  BTW, great work Mark.  It looks good.  My only regret is that there's not a 64bit version of it availablen (not sure if there's anything you can do about that :P)&lt;br&gt;&lt;br&gt;Anyway, I was wondering if there was any way to specify an account or sub-account to use for placing trades?</description><pubDate>Tue, 25 Nov 2008 07:14:27 GMT</pubDate><dc:creator>Freolad</dc:creator></item><item><title>Is Chart-Trading available in RE?</title><link>http://www.rightedgesystems.com/forums/Topic9797-11-1.aspx</link><description>IB-TWS has Chart-Trading function. It is definitely convenience for me to place order. Some trading softwares such as Wave59 and Visual Trader provide this function. Amibroker also provide sample code to realize that. However I can't find any word in RE talking about this function. So i want to know that is it prossible to execute Chart-Trading in RE ?</description><pubDate>Mon, 26 Oct 2009 07:55:47 GMT</pubDate><dc:creator>lijk1</dc:creator></item><item><title>Does RE work fully with Interactive Broker?</title><link>http://www.rightedgesystems.com/forums/Topic7425-11-1.aspx</link><description>I have an interactive brokers account and I am trying out right edge with my paper trading account. &lt;br&gt;&lt;br&gt;I wrote a very simple system (demo) to see whether RE works with IB's Trader Workstation and the only thing the code works on is submitting an order.  I.e., I can see in TWS the order being submitted.  However, I can't see any Pending, Closed or Open orders through my demo system (via OpenPositions).&lt;br&gt;&lt;br&gt;I suspect that the PositionManager or part of RE that is not updating position/order data from TWS.   Is anyone else getting this error?  Does RE work with IB?  &lt;br&gt;&lt;br&gt;Here very simple bit of code in the new bar function&lt;br&gt;----------- &lt;br&gt;this.Trader.OpenLongPosition();&lt;br&gt;System.Console.WriteLine("Positions O:"+this.OpenPositions.Count+" C:"+this.ClosedPositions.Count+" P:"+this.PendingPositions.Count);&lt;br&gt;------------  &lt;br&gt;&lt;br&gt;Output is always...[i]"Positions: O:0 C:0 P:0"[/i]&lt;br&gt;&lt;br&gt;I also tried PositionManager.CloseAllPositions() which does nothing...&lt;br&gt;&lt;br&gt;</description><pubDate>Thu, 29 Jan 2009 07:15:23 GMT</pubDate><dc:creator>liemingtang</dc:creator></item><item><title>how to tag trade with Interactive Brokers (IB)</title><link>http://www.rightedgesystems.com/forums/Topic8778-11-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;In IB trades list, which is a list of all the trades I executed, I can see all my RE trades. But I can't find a way to group trades that belong to one given RE [b]position[/b] (for example the trade to open the pos and the one to close it). All trades seem to have each their own IB "ID" and "Order ID"&lt;br&gt;Do yo have any idea on how to do that ? &lt;br&gt;&lt;br&gt;Thanks</description><pubDate>Fri, 12 Jun 2009 08:44:34 GMT</pubDate><dc:creator>FlipFlop</dc:creator></item><item><title>Profit target limit not cancelled properly when closing position</title><link>http://www.rightedgesystems.com/forums/Topic8664-11-1.aspx</link><description>(System setup: IB/TWS, IQFeed, RE1 build 384, live system using stocks)&lt;br&gt;&lt;br&gt;I noticed a funny thing recently when closing position for a stock. I work with long positions, each of which has a stop loss and a profit target sell order associated with it. When the stop loss is triggered and the position closes, the limit sell corresponding to the profit target is supposed to be cancelled, right? Well, that's not always the case.&lt;br&gt;&lt;br&gt;The problem arises for stocks that do not have shortable shares available. After the stop loss sell order has been filled, RE attempts to cancel the pending limit sell order (call it order XXX). However, when the MySymbolScript.OrderCancelled() method is called, the information message parameter says:&lt;br&gt;&lt;br&gt;"&lt;html&gt;Shares for this order are not immediately available for short sale.&lt;br&gt; The order will be held while we attempt to locate the shares.&lt;/html&gt;" (not sure why there are html tags, but that's not relevant)&lt;br&gt;&lt;br&gt;At the same time, the order status is reported as "Rejected". TWS continues to display the order as active. Attempting to cancel the order again from RE returns a code that says "Order ID XXX not found for position ID YYY". So... it appears as though RE thinks the order has been cancelled, whereas in reality it's still active.&lt;br&gt;&lt;br&gt;After seeing this message, I went into TWS and tried to manually open a short position for this same symbol. Sure enough I got the same message - "Shares for this order are not immediately available for short sale. The order will be held while we attempt to locate the shares." Ok, I thought, at least there's some consistency, but what do I do about my orders not being cancelled? It looks like TWS interprets a limit sell for X shares as an attempt to open a short position if you are not already holding X or more shares (which is the case right after the position is closed). If there are shares available for shorting, the order just hangs there until RE cancels it, assuming the market price is below the limit. Usually, the cancellation is quick, a second or two, so the order goes away and everything is peachy keen. But for stocks that don't have shares to short, a request to cancel the order results in the response from TWS described above. And the order doesn't get cancelled. Is this something that can be resolved/configured in TWS? Have you guys seens this before?&lt;br&gt;&lt;br&gt;Sorry for being long winded. Thanks!</description><pubDate>Mon, 01 Jun 2009 15:10:29 GMT</pubDate><dc:creator>Zora</dc:creator></item><item><title>OrderCancelled / OrderFilled events</title><link>http://www.rightedgesystems.com/forums/Topic8502-11-1.aspx</link><description>&lt;br&gt;1 * In which situation do we received an [b]OrderCancelled [/b]event ? My understanding is we receive this event only:&lt;br&gt;- when we close a position, we receive it for the stop loss and take profit orders&lt;br&gt;- unexpectedly when the broker has canceled our order (in that case order.CancelPending would be set to false), in that case we should resubmit the order or do whatever we want, the order is not at the broker anymore.&lt;br&gt;&lt;br&gt;2 * When we receive an [b]OrderFilled [/b]event, can we suppose the order has been filled correctly and fully ? How do you manage orders which are not filled completely ? &lt;br&gt;&lt;br&gt;3 * Where is the best place to put some code to be executed once at the end of a backtesting ? &lt;br&gt;&lt;br&gt;Thanks</description><pubDate>Tue, 19 May 2009 04:56:04 GMT</pubDate><dc:creator>FlipFlop</dc:creator></item><item><title>plugin for non supported broker</title><link>http://www.rightedgesystems.com/forums/Topic8501-11-1.aspx</link><description>Hi,&lt;br&gt;I was wondering how long (roughly) it would take to a software developer to implement a RE plugin for an unsupported broker.&lt;br&gt;&lt;br&gt;Also, supposing the broker offers an API, what are the conditions required to be able to implement a RE plugin. For example what if the broker doesn't offer a .NET (C# or VB) plugin ? The FIX protocol seems to be quite popular among the brokers, could we code an RE plugin for a FIX broker API ?&lt;br&gt;&lt;br&gt;Thanks in advance&lt;br&gt;</description><pubDate>Tue, 19 May 2009 04:51:24 GMT</pubDate><dc:creator>FlipFlop</dc:creator></item><item><title>Filling orders outside of RTH</title><link>http://www.rightedgesystems.com/forums/Topic8324-11-1.aspx</link><description>I suspect I know the answer to my question ("no"), but nonetheless: is there a way to set the "Allow orders to be filled outside of RTH" to false when my system places pre-market orders with TWS? The idea is to place orders before market open, but have them execute during RTH (regular trading hours).&lt;br&gt;&lt;br&gt;Thanks!</description><pubDate>Tue, 05 May 2009 08:22:16 GMT</pubDate><dc:creator>Zora</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>Pending order Market order not executing</title><link>http://www.rightedgesystems.com/forums/Topic8206-11-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I run a live system (with realtime data from IB) and am using the RightEdge paperbroker with the "Use bid/offer to calculate fills if available " option enabled as my broker.&lt;/P&gt;&lt;P&gt;Am running 1min bars, and sometimes the trade stays in the pending orders for quite some time (2-5bars) although there is a bid offer available and the order is a market order. Am using 1lot (position size) every time which is the minimum, hence the bid/offer size is not an issue. That way as far, as I understand, when I have a Sell Market Order it should fill me immediately by hitting the first bid (or by lifting the first offer if I have a Buy Market order).&lt;/P&gt;&lt;P&gt;However, this is not the case, does the paperbroker  wait for an actual trade to take place before filling me?? ie Volume to change?? &lt;/P&gt;&lt;P&gt;I am also assuming that my fill is the bid or offer price (Sell/Buy)  that way I have the bid/offer effect within my resulting pnl. Is that correct ??&lt;/P&gt;&lt;P&gt;Any advise would be much appreciated&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;George</description><pubDate>Mon, 27 Apr 2009 12:07:46 GMT</pubDate><dc:creator>gc</dc:creator></item><item><title>IB order placement frequency</title><link>http://www.rightedgesystems.com/forums/Topic8132-11-1.aspx</link><description>I'm not sure if this is the right place for this question, so sorry if it's out of place. I've been trying to find information about any potential problems one might run into when running a high frequency ATS hooked up to TWS. I imagine there are lots of people out there developing ATS's that place tens or hundreds or orders a day, sometimes all at once or over a very short period of time. It seems that the number of automated orders cannot grow unchecked and that at some point IB will do something about. However, the only bit of information I was able to find with regard to IB's API is a 50 message/second limit (http://74.125.93.104/search?q=cache:YPkWCQBgn0wJ:beta.elitetrader.com/vb/printthread.php%3Fthreadid%3D113603+ib+api+maximum+number+orders+site:elitetrader.com&amp;cd=22&amp;hl=en&amp;ct=clnk&amp;gl=us&amp;client=firefox-a). It is not even clear what constitutes a message, but I believe one message can be an order placement or modification, for example.&lt;br&gt;So, does anyone know what practical constraints apply when placing a large number of orders via the API in TWS? What happens if I place 100 orders at 9:30AM? 1,000 orders? How many orders can I place per day? How many pending orders can exist at the same time? I've sent an email to IB's tech support and will relay any interesting information when I get a reply.&lt;br&gt;&lt;br&gt;Thanks!</description><pubDate>Fri, 10 Apr 2009 16:25:02 GMT</pubDate><dc:creator>Zora</dc:creator></item><item><title>Disconnect and stop-loss orders</title><link>http://www.rightedgesystems.com/forums/Topic7392-11-1.aspx</link><description>A quick question.  What would happen in the following scenario:&lt;br&gt;&lt;br&gt;1.  Buy Limit order placed with broker and RightEdge is waiting to submit the stop-loss order as soon as the limit is filled.&lt;br&gt;2.  Internet connection goes down (or machine crashes).&lt;br&gt;3.  Limit order is filled at broker.&lt;br&gt;4.  Price drops below the stop-price (although no stop-order has been submitted because connection has been down).&lt;br&gt;5.  Internet connection restored.  RightEdge is notified of limit order fill.&lt;br&gt;&lt;br&gt;Would RightEdge now try to submit the old stop-loss order or would it recognize that price is now below stop-loss price and instead close the order?  If it tries to do the former, the stop-loss order might be rejected because it is above the current market price.&lt;br&gt;</description><pubDate>Sun, 25 Jan 2009 03:51:15 GMT</pubDate><dc:creator>Freolad</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></channel></rss>
