﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>RightEdge Forums / General / Suggestion Box  / TradeInsideBars, BarOpened, BarClosing / 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:38:21 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>You would need to convert your bar data to tick data.  You would want a program (which could be written as a RightEdge trading system), which for each bar would output ticks that make up that bar.  In your case you would want to output two identical ticks for the bar's open price, and then a tick each for the high, low, and close.  This tick data should be written out to a file, which you would then import into RightEdge using the tick data import tool.  Then set "Tick-level simulation" to true for your trading system and you should get two ticks for the open price.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Daniel</description><pubDate>Sun, 27 Dec 2009 00:55:26 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>I found I similiar track&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.rightedgesystems.com/forums/Topic8845-9-1.aspx?Highlight=CreateTicksFromBars"&gt;http://www.rightedgesystems.com/forums/Topic8845-9-1.aspx?Highlight=CreateTicksFromBars&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and tried to apply the logic there. &lt;/P&gt;&lt;P&gt;Unfortunately, when I try to use the first tick (nr. 1) my order is invoked on the low price. I think I understand what you mean with duplicating the open tick. The question is how?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mustafa</description><pubDate>Wed, 23 Dec 2009 13:21:15 GMT</pubDate><dc:creator>mustafaoe</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Could you say what you mean with converting data to TickData? And how can I add to open prices?&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Mustafa</description><pubDate>Wed, 23 Dec 2009 11:43:44 GMT</pubDate><dc:creator>mustafaoe</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>The simplest way to do this would probably be to convert your bars to tick data, but put in two ticks for the open price.  That way you can submit an order on the open tick of a bar, and it will get filled at that price (since you know another tick will come in at the same price).&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Daniel</description><pubDate>Tue, 22 Dec 2009 01:22:23 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I would like to decide my trade based on the fact at which level the open on the next day is.&lt;/P&gt;&lt;P&gt;I can understand that you do not allow this in live mode. One could take the NewTick method. Things are different in the simulation with historical data. There is hardy data on tick level available. &lt;/P&gt;&lt;P&gt;I real live I can also decide my trade on the fact how the open is.&lt;/P&gt;&lt;P&gt;Mustafa</description><pubDate>Mon, 21 Dec 2009 14:57:03 GMT</pubDate><dc:creator>mustafaoe</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>If you submit a market order in the NewBar() method (which happens at the end of the bar), it will be filled on the open of the next bar.&lt;br&gt;&lt;br&gt;If you want to wait to see what the open price is before deciding whether to open a position, RightEdge doesn't really support this, since by the time you've seen the price it's already passed and there's no guarantee what price the order will be filled at.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Daniel</description><pubDate>Sat, 19 Dec 2009 20:57:30 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;the SystemData does not provide the BarOpened event.&lt;/P&gt;&lt;P&gt;I want to open a position on open and set a stop loss at a certain % below the open price. The stop loss should be active immeadiately after the opening the position. &lt;/P&gt;&lt;P&gt;How to do that? &lt;/P&gt;&lt;P&gt;Using NewTick did not really helped.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mustafa</description><pubDate>Fri, 18 Dec 2009 15:24:57 GMT</pubDate><dc:creator>mustafaoe</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>The BarOpened event includes the open prices for all symbols in the system.  So in live mode it would have to wait until there was a tick for all of the symbols.  That seems unfortunate, so maybe we also need a per-symbol BarOpened event.&lt;/P&gt;&lt;P&gt;Calculating indicators that use the open price as their input before the BarOpened event is raised is indeed an interesting idea.&lt;/P&gt;&lt;P&gt;I will keep thinking about it but I don't think either of these changes will make it into the current version of RightEdge (2008 Edition 1).&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Daniel</description><pubDate>Sat, 12 Apr 2008 21:33:13 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>[quote][b]DrKoch (4/12/2008)[/b][hr]Calculate indicators which have an input series "Open" before BarOpened() is called.&lt;br&gt;Calculate all other indicators before BarClosing() is called.[/quote]&lt;br&gt;&lt;br&gt;This is an interesting idea, but I'd rather not be limited to binding to just the open/close/high/low events on a bar. And what about indicators that aren't using price series as inputs?&lt;br&gt;&lt;br&gt;Some of the indicators I use calculate a 'static' value for the active bar from the historical values of other indicators. I also have additional indicators which change on a tick-by-tick basis as the bar forms.&lt;br&gt;&lt;br&gt;For me, the ideal solution is the ability to register the indicator class itself with more events than just NewBar(). This would allow selective connection to the BarOpened/BarClosing/NewTick events with the appropriate indicator. I think something like this could minimize the overhead of having to recalculate everything on every tick, and would put the active bar in the current slot prior to any of the price quote events.&lt;br&gt;&lt;br&gt;&lt;br&gt;[quote][b]DrKoch (4/12/2008)[/b][hr]Call BarOpened() in Life mode after the first tick of a new bar came in.[/quote]&lt;br&gt;&lt;br&gt;I'd have to agree with this, the BarOpened/BarClosing events in live mode would be great. They help avoid the clutter of tick counting logic in NewTick() when attempting to handle the first/last tick on a bar.&lt;br&gt;&lt;br&gt;Cheers!&lt;br&gt;Mark</description><pubDate>Sat, 12 Apr 2008 14:03:45 GMT</pubDate><dc:creator>mark0419</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>Ok, I read through this other thread.&lt;br&gt;&lt;br&gt;What about these suggestions:&lt;br&gt;&lt;br&gt;Calculate indicators which have an input series "Open" before BarOpened() is called.&lt;br&gt;Calculate all other indicators before BarClosing() is called.&lt;br&gt;&lt;br&gt;Call BarOpened() in Life mode after the first tick of a new bar came in.</description><pubDate>Sat, 12 Apr 2008 08:31:00 GMT</pubDate><dc:creator>DrKoch</dc:creator></item><item><title>RE: TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>I think the issue you are seeing is due to the fact that, in these events, the new bar has not yet been added to the BarList.&lt;br&gt;&lt;br&gt;[url]http://www.rightedgesystems.com/forums/Topic4625-13-1.aspx?Highlight=BarClosing[/url]&lt;br&gt;&lt;br&gt;This is something that was an issue for me as well.&lt;br&gt;&lt;br&gt;[url]http://www.rightedgesystems.com/forums/Topic5256-9-1.aspx[/url]&lt;br&gt;&lt;br&gt;You might be able to achieve what you are looking for with Daniel's suggestion about manually calling NewBar() from within the event handler, prior to your trading logic. Personally, I ended up modifying my indicators to calculate/store the currently active indicator value in a separate member variable. &lt;br&gt;&lt;br&gt;One of my biggest concerns here is the fact that these events don't exist in a live system, they are called in a simulation run ONLY. However, it does sound like these interfaces will be coming into sync when tick-level back testing is implemented (which is a very good thing, imho).&lt;br&gt;&lt;br&gt;HTH,&lt;br&gt;Mark</description><pubDate>Fri, 11 Apr 2008 18:14:50 GMT</pubDate><dc:creator>mark0419</dc:creator></item><item><title>TradeInsideBars, BarOpened, BarClosing</title><link>http://www.rightedgesystems.com/forums/Topic5397-12-1.aspx</link><description>Good to have TradeInsideBars, BarOpened, BarClosing in SystemData.&lt;br&gt;&lt;br&gt;Now I can send a "MarketOnClose" Orders based on the latest, nearly complete bar and its close price - very nice.&lt;br&gt;&lt;br&gt;But,&lt;br&gt;what I really want to do:&lt;br&gt;* Calculate a bunch of indicators based on this latest close price&lt;br&gt;* do some more fancy calculations (in BarClosing)&lt;br&gt;* [b]then[/b] send a MarketOnClose order for the very same close price.&lt;br&gt;&lt;br&gt;(Yes, I checked, Indicators are currently [b]not updated[/b] at the time BarClosing is called)&lt;br&gt;&lt;br&gt;(Yes, I know this is not realistic, but it is a quick way to backtest strategies which otherwise would need much more and much more complex programming)&lt;br&gt;&lt;br&gt;Could you imagine to add indicator processing [b]before[/b] BarClosing is called?</description><pubDate>Fri, 11 Apr 2008 16:25:32 GMT</pubDate><dc:creator>DrKoch</dc:creator></item></channel></rss>
