﻿<?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 / Trading Systems  / Can RE do that? / Latest Posts</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:43:52 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>Ok, I got it:&lt;br&gt;PreviousClose price occurs in NewTick() when I not only restart strategy, but before restart I must stop Live Data Feed as well!&lt;br&gt;So, the truth is that this price occurs only when starting live data feed. &lt;br&gt;I suggests that in future RE versions it should be available at any time from strategy code.&lt;br&gt;</description><pubDate>Wed, 27 Jan 2010 10:03:51 GMT</pubDate><dc:creator>Largo</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>[quote][b]dplaisted (1/26/2010)[/b][hr]&lt;br&gt;When we reconnect, TWS should send updates for orders that were filled while the system was disconnected.  So if an order was filled while disconnected, we should get that notification and process it correctly when the system reconnects.  TWS will only send this information once though, so if you start a different system, or select different symbols, you may miss the fill information.  Also, RightEdge will only know about orders that were active when the system was disconnected, so if you submit an order yourself it won't be picked up.[/quote]&lt;br&gt;&lt;br&gt;Thank you. Good thatTWS sends order updates. The problem may occurs when:&lt;br&gt;- I have two or more strategies running the same time (which one will receive valid orders updates?)&lt;br&gt;- when I submit order from TWS by myself - could you add full sync which will import such a orders to the strategy? (full position sync with broker).&lt;br&gt;&lt;br&gt;&lt;br&gt;[quote]I added code to the NewTick() event method but I couldn't see PreviousClose.&lt;br&gt;if(tick.tickType.ToString().Equals("PreviousClose")) { ....[/quote]&lt;br&gt;[quote]What do you mean by "I couldn't see PreviousClose"?  The code should be:&lt;br&gt;if (tick.tickType == TickType.PreviousClose) { ...[/quote]&lt;br&gt;&lt;br&gt;It means that I only can see: Bid, Ask, Trade, DailyVolume in Output log. There is no PreviousClose. Yesterday, about 21:10 CET (central european time) I once saw that information, but I think that was because TWS restarted itself.&lt;br&gt;I modified code as you mentioned, but it's the same. TWS doesn't sends PreviousClose in NewTick() too often. &lt;br&gt;I need this price immediately after strategy restarts.&lt;br&gt;&lt;br&gt;[quote]It's most important thing for me to have this information in my strategy. I hope it's last missing thing after implementing it I can buy RE.&lt;br&gt;&lt;br&gt;So, there are two ways to get this price? One, from your Live Data window, second, after adding by you information to tick data, for example each minute?[/quote]&lt;br&gt;&lt;br&gt;[quote]The strategy doesn't have direct access to the live data window, so you will need to use the NewTick() event.[/quote]&lt;br&gt;&lt;br&gt;Ok, but in NewTick() there is no possibility for now (as described above).</description><pubDate>Wed, 27 Jan 2010 06:39:55 GMT</pubDate><dc:creator>Largo</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>[i]I thought I posted this yesterday, but it looks like it either got deleted accidentally or I never actually did post it[/i]&lt;br&gt;&lt;br&gt;[quote][b]Largo (1/25/2010)[/b][hr]ad.1&lt;br&gt;If you tells: "We don't go out to the broker and synchronize, but we store what we did and ask you to confirm on startup that those positions are still the way we think they were."&lt;br&gt;then it's not enough, because what if my pending order become market position meanwhile? - in strategy log it's still pending order but in real life this is filled market position!&lt;br&gt;&lt;br&gt;The only professional solution is to get positions (both open and closed) and pending orders (both pending and cancelled) from broker during strategy startup!&lt;br&gt;&lt;br&gt;That's the manner as ProTrader MultiStation works with IB and how is MetaTrader4 constructed by default.[/quote]&lt;br&gt;When we reconnect, TWS should send updates for orders that were filled while the system was disconnected.  So if an order was filled while disconnected, we should get that notification and process it correctly when the system reconnects.  TWS will only send this information once though, so if you start a different system, or select different symbols, you may miss the fill information.  Also, RightEdge will only know about orders that were active when the system was disconnected, so if you submit an order yourself it won't be picked up.&lt;br&gt;&lt;br&gt;[quote]I added code to the NewTick() event method but I couldn't see PreviousClose.&lt;br&gt;if(tick.tickType.ToString().Equals("PreviousClose")) { ....[/quote]&lt;br&gt;What do you mean by "I couldn't see PreviousClose"?  The code should be:&lt;br&gt;if (tick.tickType == TickType.PreviousClose) { ...&lt;br&gt;&lt;br&gt;[quote]It's most important thing for me to have this information in my strategy. I hope it's last missing thing after implementing it I can buy RE.&lt;br&gt;&lt;br&gt;So, there are two ways to get this price? One, from your Live Data window, second, after adding by you information to tick data, for example each minute?[/quote]&lt;br&gt;&lt;br&gt;The strategy doesn't have direct access to the live data window, so you will need to use the NewTick() event.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Daniel</description><pubDate>Tue, 26 Jan 2010 21:27:02 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>Billb,&lt;br&gt;Yesterday I ran the same code against ES instrument (S&amp;P500 future with expiration 20100319) and I had no PreviousClose entry.&lt;br&gt;How often do you see it on MSFT?&lt;br&gt;And PartialBar.Close I think has nothing to do, because I use 1 minutes bars, not daily bars.&lt;br&gt;&lt;br&gt;(My strategy uses yesterday settlement price for calculations entry/exit prices for intraday trading)&lt;br&gt;&lt;br&gt;But how you get Close (it's yesterday close price) to the Live Data instrument table window? Couldn't I get it from this place in my strategy?</description><pubDate>Tue, 26 Jan 2010 08:55:12 GMT</pubDate><dc:creator>Largo</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>I misunderstood, I did not see that you were using tick data.  Yes, you should get the PreviousClose tick assuming the broker supports it.  It is possible that this tick is coming in before the system starts, but I ran a quick test with IB.  I screenshotted the PreviousClose tick (attached).  Here is my system code that monitored if that's useful to you.&lt;/P&gt;&lt;P style="LINE-HEIGHT: normal; 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;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; NewTick(BarData partialBar, TickData tick)&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="LINE-HEIGHT: normal; 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="LINE-HEIGHT: normal; 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;OutputMessage(tick.tickType + &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: maroon; FONT-SIZE: 10pt"&gt;": "&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt"&gt; + tick.price);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="LINE-HEIGHT: normal; 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;OutputMessage(partialBar.Close.ToString());&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="LINE-HEIGHT: normal; 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&gt;&lt;IMG src="http://www.rightedgesystems.com/forums/Uploads/Images/181f677d-41ed-45e2-a32d-7ce9.png"&gt;</description><pubDate>Tue, 26 Jan 2010 08:17:52 GMT</pubDate><dc:creator>billb</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>ad.1&lt;br&gt;If you tells: "We don't go out to the broker and synchronize, but we store what we did and ask you to confirm on startup that those positions are still the way we think they were."&lt;br&gt;then it's not enough, because what if my pending order become market position meanwhile? - in strategy log it's still pending order but in real life this is filled market position!&lt;br&gt;&lt;br&gt;The only professional solution is to get positions (both open and closed) and pending orders (both pending and cancelled) from broker during strategy startup!&lt;br&gt;&lt;br&gt;That's the manner as ProTrader MultiStation works with IB and how is MetaTrader4 constructed by default.&lt;br&gt;&lt;br&gt;&lt;br&gt;ad.2&lt;br&gt;Getting yesterday close price for ie. S&amp;P500 e-mini futures (symbol: ES) from broker.&lt;br&gt;Your anwsers are:&lt;br&gt;a) "To get yesterday's close, you'd want to set lead bars and then you could go backwards and get prior close data."&lt;br&gt;b) "The previous day's close is sent as a tick with a TickType of PreviousClose. It is up to the broker plugin to send this tick. The TWS plugin does so, but I believe it only does so once for each symbol, which may be before your system starts processing ticks. So it may need to be modified to send this tick periodically. Fortunately we have released the source code to the TWS plugin, so it shouldn't be too hard to do this."&lt;br&gt;&lt;br&gt;&lt;br&gt;ad a) &lt;br&gt;In RE GUI, "Live Data" window there is column called "Close" (available after right click -&gt; Configure columns -&gt; move "Close" to "Available")&lt;br&gt;It's the value I need in my strategy code. So, I think I don't need to collect any historical bars to read daily bar close price, because RE does not do that - this value is available in this window immediately.&lt;br&gt;&lt;br&gt;So, can I read the same value from strategy code?&lt;br&gt;&lt;br&gt;ad b)&lt;br&gt;I added code to the NewTick() event method but I couldn't see PreviousClose.&lt;br&gt;if(tick.tickType.ToString().Equals("PreviousClose")) { ....&lt;br&gt;&lt;br&gt;&lt;br&gt;It's most important thing for me to have this information in my strategy. I hope it's last missing thing after implementing it I can buy RE.&lt;br&gt;&lt;br&gt;So, there are two ways to get this price? One, from your Live Data window, second, after adding by you information to tick data, for example each minute?&lt;br&gt;&lt;br&gt;&lt;br&gt;</description><pubDate>Mon, 25 Jan 2010 16:00:17 GMT</pubDate><dc:creator>Largo</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>I installed IBController and it behaves quite good.&lt;br&gt;&lt;br&gt;ProTrader MultiStation uses the same way to connect to IB (TWS API) and they provides function to get yesterday close price:&lt;br&gt;"You can get PrevClose value for IB S&amp;P Futures via MarketInfo function (for example "MarketInfo("ES201003GLOBEX", 51) ")"&lt;br&gt;&lt;br&gt;http://www.protrader.org/showthread.php?t=1922&lt;br&gt;&lt;br&gt;So, I'll prefer that way, but I'll check how it's done in RE.</description><pubDate>Thu, 21 Jan 2010 07:18:53 GMT</pubDate><dc:creator>Largo</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>The previous day's close is sent as a tick with a TickType of PreviousClose.  It is up to the broker plugin to send this tick.  The TWS plugin does so, but I believe it only does so once for each symbol, which may be before your system starts processing ticks.  So it may need to be modified to send this tick periodically.  Fortunately we have released the source code to the TWS plugin, so it shouldn't be too hard to do this.&lt;br&gt;&lt;br&gt;RightEdge doesn't have any functionality to restart TWS.  There is a utility called IBController in the files section of the Yahoo [url=http://finance.groups.yahoo.com/group/TWSAPI/]TWS API[/url] group which I believe does a good job of keeping TWS up and running and should work with RightEdge.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Daniel</description><pubDate>Wed, 20 Jan 2010 00:46:41 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>Thank you.&lt;br&gt;&lt;br&gt;ad.2 I also can see that close price in "Live Data" Window -&gt; "Close", so I think it will be available from strategy code too :)&lt;br&gt;ad.1 If you do not synchronize positions and orders with broker after restarting RE then is one limitation: I can't do emergency trading from broker's platform (TWS). But probably I can live with that:)&lt;br&gt;&lt;br&gt;I have another question: if RE could restart TWS after it closes? TWS has strange functionality that closes platform every day. I know there are third party programs that do that, but the more layers the more risk of error. For now there is much layers: Broker - Internet - VPS - Internet - TWS - RE&lt;br&gt;</description><pubDate>Tue, 19 Jan 2010 07:57:09 GMT</pubDate><dc:creator>Largo</dc:creator></item><item><title>RE: Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>We try to match things up as best as we can based on the data we have.  We don't go out to the broker and synchronize, but we store what we did and ask you to confirm on startup that those positions are still the way we think they were.  Try the trial to see if this suits your needs.&lt;br&gt;&lt;br&gt;To get yesterday's close, you'd want to set lead bars and then you could go backwards and get prior close data.&lt;br&gt;&lt;br&gt;[quote][b]Largo (1/12/2010)[/b][hr]Hi everybody,&lt;br&gt;&lt;br&gt;I'm looking for platform for automated trading futures instruments through Interactive Brokers.&lt;br&gt;I tried to implement strategy in OpenQuant, but it lacks of basic functionalities!&lt;br&gt;&lt;br&gt;So, please confirm if Right Edge allows:&lt;br&gt;1. Restoring strategy state after restarting platform: information about pending orders submitted before must be available as well as about filled orders.&lt;br&gt;2. Obtain yesterday close price for futures (ie. S&amp;P 500 e-mini) from IB (it's official settlement price, seen in TWS by adding "Close" column to the instrument list).&lt;br&gt;[/quote]</description><pubDate>Wed, 13 Jan 2010 09:38:19 GMT</pubDate><dc:creator>billb</dc:creator></item><item><title>Can RE do that?</title><link>http://www.rightedgesystems.com/forums/Topic10476-9-1.aspx</link><description>Hi everybody,&lt;br&gt;&lt;br&gt;I'm looking for platform for automated trading futures instruments through Interactive Brokers.&lt;br&gt;I tried to implement strategy in OpenQuant, but it lacks of basic functionalities!&lt;br&gt;&lt;br&gt;So, please confirm if Right Edge allows:&lt;br&gt;1. Restoring strategy state after restarting platform: information about pending orders submitted before must be available as well as about filled orders.&lt;br&gt;2. Obtain yesterday close price for futures (ie. S&amp;P 500 e-mini) from IB (it's official settlement price, seen in TWS by adding "Close" column to the instrument list).&lt;br&gt;</description><pubDate>Tue, 12 Jan 2010 15:00:49 GMT</pubDate><dc:creator>Largo</dc:creator></item></channel></rss>
