0
Follow
5
Followers
어떻게 DPO 지표를 사용해야 할까요?
먼저 DPO 지표의 계산 공식을 알아야 합니다.
1 , MA = N일간의 간단한 이동 평균;
2 DPO = 마감 가격-MA (N/2+1) 의 간단한 이동 평균;
3 MADPO=DPO의 M일간의 간단한 이동 평균
그 중, N=21, M=6。
DPO 지표의 사용 방법:
1 , 0 축 위에, DPO가 오버 바이 라인에 오르면, 주가가 단기 최고점에 있다는 것을 의미하는 오버 바이 라인을 설정하십시오.
0축 아래, 오버소드 라인을 설정합니다. DPO가 오버소드 라인에 오르면, 주가가 단기 하락점에 있다는 것을 의미합니다.
3 DPO 지표가 0축 위에 있다면, 다단 시장에 있다. DPO 지표가 0축을 마이너스로 상향으로 통과하면, 이것은 구매 신호이다.
4, DPO 지표가 0축 아래에 있다면, 공백 시장에 있다. DPO 지표가 0축을 정값에서 아래로 통과하면, 이것은 팔기 신호이다.
Related Recommendations
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?
Comment
All comments (1)
/*
计算方法:
1、MA的N日收盘价加总/N
2、DPO = 收盘价 - ((n / 2) + 1)日的MA
3、MADPO = DPO M日的移动平均
N = 21, M = 6
*/
// 指标算法
function DPO(r, n) {
var arrDpo = []
for (var i = 0 ; i < r.length ; i++) {
var currRecords = []
for (var j = 0 ; j < i ; j++) {
currRecords.push(r[j])
}
var ma = TA.MA(currRecords, (_N(n / 2, 0) + 1))
var dpo = NaN
if (currRecords.length == 0 || !ma || ma.length == 0 || !ma[ma.length - 1]) {
dpo = NaN
} else {
var close = r[i].Close
dpo = close - ma[ma.length - 1]
}
arrDpo.push(dpo)
}
return arrDpo
}
function MADPO(dpo, m) {
return TA.MA(dpo, m)
}
// 使用指标例子
function main() {
var r = exchange.GetRecords()
var dpo = DPO(r, 21)
Log(_D(r[r.length - 1].Time), "dpo on last bar:", dpo[dpo.length - 1])
Log(_D(r[r.length - 2].Time), "dpo on pre bar:", dpo[dpo.length - 2])
var madpo = MADPO(dpo, 6)
Log(_D(r[r.length - 1].Time), "madpo on last bar:", madpo[madpo.length - 1])
Log(_D(r[r.length - 2].Time), "madpo on pre bar:", madpo[madpo.length - 2])
}
给你个思路,不保证对,没验证过。
5 years ago
- 1
