- Tháng sáu 24, 2013
- Gửi bởi: Nhóm ngoại hối Wiki
- Loại: Ngoại hối Ấn Độ
Tên: |
|
||
Tác giả: | forexavatar (2010.02.24 11:22) | ||
Đã tải xuống: | 10828 | ||
Tải xuống: |
|
||
Sự miêu tả:The big problem of all MA indicators is giving false signals in consolidation moments. This indicator uses simple trick to eliminate false signals in consolidation. Hình ảnh:
How to identify consolidation? Get max and min values from a few last candles - if current price contains in max and min area ( tối thiểu > PRICE < tối đa ) we can say that it's a consolidation moment. int candles = 6; double min = Low[iLowest(VÔ GIÁ TRỊ,0,MODE_LOW,Nến,i+2)]; double max = High[iHighest(VÔ GIÁ TRỊ,0,MODE_HIGH,Nến,i+2)]; bool horizontal = false; nếu như(mẹ[0] < tối đa && mẹ[0] > tối thiểu) { horizontal = true; } Signal function where i - number of bar int MovingAverage(int i) { double ma[3]; int period = _Period; mẹ[0] = iMA(VÔ GIÁ TRỊ,0,Giai đoạn,0,MODE_EMA,PRICE_MEDIAN,Tôi); mẹ[1] = iMA(VÔ GIÁ TRỊ,0,Giai đoạn,0,MODE_EMA,PRICE_MEDIAN,tôi+1); mẹ[2] = iMA(VÔ GIÁ TRỊ,0,Giai đoạn,0,MODE_EMA,PRICE_MEDIAN,i+2); int candles = 6; double min = Low[iLowest(VÔ GIÁ TRỊ,0,MODE_LOW,Nến,i+2)]; double max = High[iHighest(VÔ GIÁ TRỊ,0,MODE_HIGH,Nến,i+2)]; bool horizontal = false; nếu như(mẹ[0] < tối đa && mẹ[0] > tối thiểu) { horizontal = true; } nếu như(mẹ[1] < mẹ[0] && horizontal == false) { trở lại(1); In(" "); } else if(mẹ[1] > mẹ[0] && horizontal == false) { trở lại(-1); } else { trở lại(0); } } |