Dukascopy
 
 
Wiki JStore Search Login

关于 myPreviousBar and currTimeBar的问题
 Post subject: 关于 myPreviousBar and currTimeBar的问题 Post rating: 0   New post Posted: Fri 30 Dec, 2016, 12:48 
User avatar

User rating: 0
Joined: Fri 30 Dec, 2016, 12:38
Posts: 1
Location: ChinaChina
在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的时间。
这是不是产生了矛盾?请指点,非常感谢。


 
 Post subject: Re: 关于 myPreviousBar and currTimeBar的问题 Post rating: 0   New post Posted: Fri 17 Feb, 2017, 08:59 
Visual JForex expert at Dukascopy

User rating: 1
Joined: Fri 28 Aug, 2015, 09:49
Posts: 53
Location: China, Shanghai
您好,

请您将该问题发送到[email protected]

会有相关人员查看并回复您的。

祝好,

Zheyu Zhang


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com