Hi Eugene, Thanks for your reply and suggestion. EMA is a very good idea, I would use the indicator, however I still have questions regarding how to implement my strategy. Let's say I would like to compare the two values of both 60 EMA for 10 minute and 20 EMA for 60 minutes, I would like to compare the two values in addition to other strategies before make any trading decisions.
How to calculate them, do I have to build price bars for 10 minutes and 60 minutes first? I am not quite familiar with JBT, please suggest, some code examples would be much helpful. Best regards, --Frank On Thursday, August 14, 2014 4:45:56 PM UTC-5, Eugene Kononov wrote: > > Price bars are typically used by the longer-term traders. JBT is best used > for short-term trading (with the typical holding time of seconds to hours). > Since JBT provides a 1-second resolution to prices and depth balances, > building a price bar should be easy. For example, a 1 minute OHLC > (open-high-low-close) bar can be constructed from a 1-second history as > follows: > > 1-min bar Open: price 60 seconds ago > 1-min bar Close: price now > 1-min bar High: the highest price in the last 60 seconds > 1-min bar Low: the lowest price in the last 60 seconds > > Instead of bars, I prefer exponential moving averages. See PriceEMA.java, > for example. > > > > > > On Thu, Aug 14, 2014 at 5:21 PM, Frank <[email protected] <javascript:>> > wrote: > >> Hi Eugene, >> >> Thanks for your reply. It's good idea to simulate orders in JBookTrader. >> I am going to giVe it a try. >> >> However, I will need build price bar and implement logics on pricing >> trend perspective in addition to market depth. >> >> Can you provide some suggestions on how to implement price bar based on >> price history? >> >> Thanks, >> >> Frank >> >> -- >> You received this message because you are subscribed to the Google Groups >> "JBookTrader" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/jbooktrader. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "JBookTrader" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/jbooktrader. For more options, visit https://groups.google.com/d/optout.
