- มิถุนายน 24, 2013
- โพสโดย: ทีมงาน Forex Wiki
- หมวดหมู่: FX อินเดีย
ไม่มีความคิดเห็น
1606
1478
เนื้อหา
ชื่อ: |
|
||
ผู้เขียน: | อัตราแลกเปลี่ยน (2010.02.24 11:22) | ||
ดาวน์โหลดแล้ว: | 10828 | ||
ดาวน์โหลด: |
|
||
คำอธิบาย: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. ภาพ:
How to identify consolidation? Get max and min values from a few last candles - if current price contains in max and min area ( นาที > PRICE < สูงสุด ) we can say that it's a consolidation moment. int candles = 6; double min = Low[iLowest(โมฆะ,0,MODE_LOW,เทียน,i+2)]; double max = High[iHighest(โมฆะ,0,MODE_HIGH,เทียน,i+2)]; bool horizontal = false; ถ้า(แม่[0] < สูงสุด && แม่[0] > นาที) { horizontal = true; } Signal function where i - number of bar int MovingAverage(int i) { double ma[3]; int period = _Period; แม่[0] = iMA(โมฆะ,0,ระยะเวลา,0,MODE_EMA,PRICE_MEDIAN,ฉัน); แม่[1] = iMA(โมฆะ,0,ระยะเวลา,0,MODE_EMA,PRICE_MEDIAN,i+1); แม่[2] = iMA(โมฆะ,0,ระยะเวลา,0,MODE_EMA,PRICE_MEDIAN,i+2); int candles = 6; double min = Low[iLowest(โมฆะ,0,MODE_LOW,เทียน,i+2)]; double max = High[iHighest(โมฆะ,0,MODE_HIGH,เทียน,i+2)]; bool horizontal = false; ถ้า(แม่[0] < สูงสุด && แม่[0] > นาที) { horizontal = true; } ถ้า(แม่[1] < แม่[0] && horizontal == false) { return(1); Print(" "); } else if(แม่[1] > แม่[0] && horizontal == false) { return(-1); } else { return(0); } } |