- ਜੂਨ 24, 2013
- ਵੱਲੋਂ ਪੋਸਟ ਕੀਤਾ ਗਿਆ: ਫਾਰੇਕਸ ਵਿਕੀ ਟੀਮ
- ਸ਼੍ਰੇਣੀ: FX ਇੰਡ
ਨਾਮ: |
|
||
ਲੇਖਕ: | 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 < max ) we can say that it's a consolidation moment. int candles = 6; double min = Low[iLowest(NULL,0,MODE_LOW,ਮੋਮਬੱਤੀਆਂ,i+2)]; double max = High[iHighest(NULL,0,MODE_HIGH,ਮੋਮਬੱਤੀਆਂ,i+2)]; bool horizontal = false; ਜੇਕਰ(ਮਾ[0] < max && ਮਾ[0] > ਮਿੰਟ) { horizontal = true; } Signal function where i - number of bar int MovingAverage(int i) { double ma[3]; int period = _Period; ਮਾ[0] = iMA(NULL,0,period,0,MODE_EMA,PRICE_MEDIAN,i); ਮਾ[1] = iMA(NULL,0,period,0,MODE_EMA,PRICE_MEDIAN,i+1); ਮਾ[2] = iMA(NULL,0,period,0,MODE_EMA,PRICE_MEDIAN,i+2); int candles = 6; double min = Low[iLowest(NULL,0,MODE_LOW,ਮੋਮਬੱਤੀਆਂ,i+2)]; double max = High[iHighest(NULL,0,MODE_HIGH,ਮੋਮਬੱਤੀਆਂ,i+2)]; bool horizontal = false; ਜੇਕਰ(ਮਾ[0] < max && ਮਾ[0] > ਮਿੰਟ) { horizontal = true; } ਜੇਕਰ(ਮਾ[1] < ਮਾ[0] && horizontal == false) { ਵਾਪਸੀ(1); ਛਾਪੋ(" "); } else if(ਮਾ[1] > ਮਾ[0] && horizontal == false) { ਵਾਪਸੀ(-1); } else { ਵਾਪਸੀ(0); } } |