- Октябрь 17, 2013
- Опубликовано: Команда Форекс Вики
- Категория: Форекс Инд
Имя: |
|
||
Автор: | МетаЦитаты (2008.02.10 15:45) | ||
Скачано: | 4699 | ||
Скачать: |
|
||
Indicator Smoothed ADX was written on demand of a forum visitor and was not too difficult. Однако, the search for a description of the smoothed ADX algorithm resulted in nothing. This is why I give below only the code that has been provided: Входы: {declaring inputs} переменные: {declaring variables}
DMIPlus( 0 ), DMIMinus( 0 ), DMI( 0 ), ADX( 0 ), DIPlusLead(0), DIMinusLead(0), DIPlusFinal(0), DIMinusFinal(0), ADXLead(0), ADXFinal(0); {now calling the built-in ADX functions, so we don't need to calculate them}
Value1 = DirMovement( ЧАС, л, С, Length, DMIPlus, DMIMinus, ADX);
{this part is the actual smoothing of the original ADX indicator, DI+, DI- and ADX lines are smoothed}
DIPlusLead = 2*DMIPlus + (alpha1 - 2) * DMIPlus[1] + (1 - alpha1) * DIPlusLead[1];
DIPlusFinal = alpha2*DIPlusLead + (1 - alpha2) * DIPlusFinal[1]; DIMinusLead = 2*DMIMinus + (alpha1 - 2) * DMIMinus[1] + (1 - alpha1) * DIMinusLead[1];
DIMinusFinal = alpha2*DIMinusLead + (1 - alpha2) * DIMinusFinal[1]; ADXLead = 2*ADX + (alpha1 - 2) * ADX[1] + (1 - alpha1) * ADXLead[1];
ADXFinal = alpha2*ADXLead + (1 - alpha2) * ADXFinal[1]; {Plotting them on chart}
Plot1( DIPlusFinal, "DMI+" ) ;
Plot2( DIMinusFinal, "DMI-" ) ;
Plot3( ADXFinal, "ADX" ) ;
Или, in a different way: Том(п) "=" 8*P0 - 7Р1 - Ehlers' burst (the term is invented by myself). At the second stage, we apply the simple weighted smoothing: W0 = (1*V0 + 2*П1) / (2 + 1).
In Smoothed ADX, this smoothing algorithm is applied to all three buffers of standard indicator ADX. This is why the obtained indicator is called Smoothed ADX. If we were smoothing indicator RSI, we would call it Smoothed RSI, и т. д.. The figure below shows that Smoothed ADX, indeed, is not so 'twitchy' as the original, standard ADX (Средний индекс направленного движения).
|
|||
1 комментарий Чтобы опубликовать новый комментарий, пожалуйста авторизоваться или регистр
This is a reallly good indicator. Thanks Rosh! I have one question. How would I compare the current ADXFinal value with the ADXFinal value 3 periods ago? Shouldn't it already be housed in the array? Если так, где? I the array count down confused me a bit as it's been a long time since I've coded. TIA. |