Dukascopy
 
 
Wiki JStore Search Login

策略中SMA值和测试图表上的SMA值不一致的问题
 Post subject: 策略中SMA值和测试图表上的SMA值不一致的问题 Post rating: 0   New post Posted: Thu 16 Apr, 2015, 12:51 
User avatar

User rating: 0
Joined: Sun 12 Apr, 2015, 09:30
Posts: 27
Location: ChinaChina
测试一个策略,使用的是以下参数

Image

Image
然后我在测试的图表上加上了SMA(20)的指标线,在与策略中SMA模块输出的值进行比较,发现最后的输出值两者不一样,请问是怎么回事?
策略中SMA的输出是line10
Image

Image


Attachments:
4.png [25.67 KiB]
Downloaded 297 times
3.png [36.47 KiB]
Downloaded 325 times
2.png [17.74 KiB]
Downloaded 336 times
1.png [54.61 KiB]
Downloaded 316 times
mystrategySMA1.vfs [45.66 KiB]
Downloaded 160 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: 策略中SMA值和测试图表上的SMA值不一致的问题 Post rating: 0   New post Posted: Thu 23 Apr, 2015, 14:38 
Visual JForex expert at Dukascopy
User avatar

User rating: 1
Joined: Thu 29 Aug, 2013, 13:07
Posts: 88
Location: Ukraine, Kiev
测试后的SMA数据和图表上的SMA数据不一样是因为两个原因,一个是需要加入蜡烛时间的filter,要不然不同时间段的candle close价格都会算进去,在一个是SMAshift要把0调成1,因为策略里SMA指标换算的方式是蜡烛关掉后新的蜡烛的价格就会被换算进去,虽然测试停止,里面SMA是价格已包括最后蜡烛之后的一个蜡烛,在图表上的SMA不包括之后还没有出来的蜡烛,所以价格不一样,用shift1就不会有这个问题。
Image
Image


Attachments:
screenshot II.JPG [145.46 KiB]
Downloaded 289 times
screenshot I.JPG [138.74 KiB]
Downloaded 322 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 

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