MA without consolidation problem

0
(0)
姓名:
MA without consolidation problem
作者: forexavatar (2010.02.24 11:22)
已下載: 10828
下載:
MA without consolidation problem 1
MaStillWorks.mq4 (2.2 KB) 看法
 

描述:

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.

圖像:

MA without consolidation problem 2

 

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);
   }
}

這篇文章有多有用?

點擊一顆星即可對其進行評分!

平均評分 0 / 5. 計票數: 0

目前還沒有投票! 成為第一個評價這篇文章的人.

很抱歉這篇文章對您沒有用!

讓我們改進這篇文章!

告訴我們如何改進這篇文章?



作者: 外匯維基團隊
我們是一支經驗豐富的外匯交易員團隊 [2000-2023] 致力於以我們自己的方式生活的人. 我們的主要目標是實現財務獨立和自由, 我們追求自我教育並在外匯市場上獲得豐富的經驗,以此作為實現自我可持續生活方式的手段.