- يونيو 24, 2013
- منشور من طرف: فريق ويكي الفوركس
- فئة: FX Ind
لا توجد تعليقات
1606
1478
اسم: |
|
||
مؤلف: | forexavatar (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; لو(ma[0] < الأعلى && ma[0] > دقيقة) { horizontal = true; } Signal function where i - number of bar int MovingAverage(int i) { double ma[3]; int period = _Period; ma[0] = iMA(باطل,0,period,0,MODE_EMA,PRICE_MEDIAN,أنا); ma[1] = iMA(باطل,0,period,0,MODE_EMA,PRICE_MEDIAN,i+1); ma[2] = iMA(باطل,0,period,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; لو(ma[0] < الأعلى && ma[0] > دقيقة) { horizontal = true; } لو(ma[1] < ma[0] && horizontal == false) { return(1); Print(" "); } else if(ma[1] > ma[0] && horizontal == false) { return(-1); } else { return(0); } } |