Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
关于 myPreviousBar and currTimeBar的问题 http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=183&t=54582 |
Page 1 of 1 |
Author: | fwushi8888 [ Fri 30 Dec, 2016, 12:48 ] |
Post subject: | 关于 myPreviousBar and currTimeBar的问题 |
在WIKI的Strategy Tutorial里面(https://www.dukascopy.com/wiki/en/development/get-started-api/use-in-jforex/strategy-tutorial),有两个案例,一个是Trade According to Last Completed Bar,另一个为Trade According to SMA Trend。 现对myPreviousBar到底是哪个Bar出现疑问。在前面的案例中,myPreviousBar是指当前时间中最近形成的Bar,指过去的Bar,所以有OrderCommand myCommand = previousBar.getOpen() > previousBar.getClose() ? OrderCommand.SELL : OrderCommand.BUY; 但在SMA策略案例中,currBarTime=myPreviousBar.getTime()却j是指当前Bar,当前Bar对应的时间,并不是前一完成Bar的时间。 这是不是产生了矛盾?请指点,非常感谢。 |
Author: | KelvinZhang [ Fri 17 Feb, 2017, 08:59 ] |
Post subject: | Re: 关于 myPreviousBar and currTimeBar的问题 |
您好, 请您将该问题发送到[email protected]。 会有相关人员查看并回复您的。 祝好, Zheyu Zhang |
Page 1 of 1 |