Обсуждение статьи "Торговля по каналам Дончиана"

 

Опубликована статья Торговля по каналам Дончиана:

В статье разрабатываются и тестируются несколько стратегий на основе канала Дончиана с применением различных индикаторных фильтров. Проводится исследование и сравнительный анализ их работы.

1. Канал Дончиана + ADX.

Условия этой системы:

  • Происходит пробой верхней или нижней границы канала Дончиана.
  • Основная линия силы тренда ADX должны быть выше предустановленного уровня ADX Level.
  • При пробое вверх линия DI+ должна быть выше DI-. Соответственно, при пробое вниз DI- выше DI+.

Рис.2. Условия входа в рынок стратегии канал Дончиана+ADX

Автор: Alexander Fedosov

 

Канал Дончиана == стандартный ЗигЗаг - соответственно сигнал будет сильно запаздывать.

Канал Дончиана - хорошо подходит для трала, и для тейк профита при контр тренде.

 
'DonchianExpert.mq5' DonchianExpert.mq5 1 1
'TradeFunctions.mqh' TradeFunctions.mqh 1 1
'PositionInfo.mqh' PositionInfo.mqh 1 1
'Object.mqh' Object.mqh 1 1
'StdLibErr.mqh' StdLibErr.mqh 1 1
'SymbolInfo.mqh' SymbolInfo.mqh 1 1
'Trailing.mqh' Trailing.mqh 1 1
'DonchianUI.mqh' DonchianUI.mqh 1 1
can't open "C:\Program Files\RoboForex - MetaTrader 5\MQL5\include\EasyAndFastGUI\WndEvents.mqh" include file DonchianUI.mqh 6 11
'CWndEvents' - declaration without type DonchianUI.mqh 10 28
'CWndEvents' - syntax error DonchianUI.mqh 10 28
'CDonchianUI' - member function not defined DonchianUI.mqh 51 14
'~CDonchianUI' - member function not defined DonchianUI.mqh 57 15
'OnInitEvent' - member function not defined DonchianUI.mqh 63 19
'OnDeinitEvent' - member function not defined DonchianUI.mqh 69 19
'OnTimerEvent' - member function not defined DonchianUI.mqh 77 19
'OnEvent' - member function not defined DonchianUI.mqh 97 19
'CreateMainPanel' - member function not defined DonchianUI.mqh 113 19
'CreateStatusBar' - member function not defined DonchianUI.mqh 141 19
'CreateLabel1' - member function not defined DonchianUI.mqh 168 19
'CreateLabel2' - member function not defined DonchianUI.mqh 187 19
'CreateLabel3' - member function not defined DonchianUI.mqh 206 19
'CreateCanvasTable' - member function not defined DonchianUI.mqh 224 19
'CDonchianUI' - struct undefined DonchianExpert.mq5 19 1
'CWndEvents' - import not defined DonchianUI.mqh 72 4
')' - semicolon expected DonchianUI.mqh 73 3
'OnTimerEvent' - function already defined and has body DonchianUI.mqh 77 19
'OnTimerEvent' - the declaration not allowed for the current scope DonchianUI.mqh 77 19
'OnEvent' - function already defined and has body DonchianUI.mqh 97 19
'OnEvent' - the declaration not allowed for the current scope DonchianUI.mqh 97 19
'CreateMainPanel' - function already defined and has body DonchianUI.mqh 113 19
'CreateMainPanel' - the declaration not allowed for the current scope DonchianUI.mqh 113 19
'CreateStatusBar' - function already defined and has body DonchianUI.mqh 141 19
'CreateStatusBar' - the declaration not allowed for the current scope DonchianUI.mqh 141 19
'CreateLabel1' - function already defined and has body DonchianUI.mqh 168 19
'CreateLabel1' - the declaration not allowed for the current scope DonchianUI.mqh 168 19
'CreateLabel2' - function already defined and has body DonchianUI.mqh 187 19
'CreateLabel2' - the declaration not allowed for the current scope DonchianUI.mqh 187 19
'CreateLabel3' - function already defined and has body DonchianUI.mqh 206 19
'CreateLabel3' - the declaration not allowed for the current scope DonchianUI.mqh 206 19
'CreateCanvasTable' - function already defined and has body DonchianUI.mqh 224 19
'CreateCanvasTable' - the declaration not allowed for the current scope DonchianUI.mqh 224 19
declaration of 'Trade' hides global declaration at line 17 DonchianExpert.mq5 17 13
   see previous declaration of 'Trade' DonchianExpert.mq5 17 13
declaration of 'Trall' hides global declaration at line 18 DonchianExpert.mq5 18 13
   see previous declaration of 'Trall' DonchianExpert.mq5 18 13
'CDonchianUI' - struct undefined DonchianExpert.mq5 19 1
declaration of 'UI' hides global declaration at line 19 DonchianExpert.mq5 19 13
   see previous declaration of 'UI' DonchianExpert.mq5 19 13
enumeration already defined DonchianExpert.mq5 23 6
'Donchian' - enumerator identifier already defined DonchianExpert.mq5 25 4
'Donchian_ADX' - enumerator identifier already defined DonchianExpert.mq5 26 4
'Donchian_MACD' - enumerator identifier already defined DonchianExpert.mq5 27 4
'Donchian_AvrSpeed_RSI' - enumerator identifier already defined DonchianExpert.mq5 28 4
enumeration already defined DonchianExpert.mq5 33 6
'HIGH_LOW' - enumerator identifier already defined DonchianExpert.mq5 35 4
'HIGH_LOW_OPEN' - enumerator identifier already defined DonchianExpert.mq5 36 4
'HIGH_LOW_CLOSE' - enumerator identifier already defined DonchianExpert.mq5 37 4
'OPEN_HIGH_LOW' - enumerator identifier already defined DonchianExpert.mq5 38 4
'CLOSE_HIGH_LOW' - enumerator identifier already defined DonchianExpert.mq5 39 4
'sinput' - unexpected token DonchianExpert.mq5 44 1
declaration of 'Inp_EaComment' hides global declaration at line 44 DonchianExpert.mq5 44 28
   see previous declaration of 'Inp_EaComment' DonchianExpert.mq5 44 28
'input' - unexpected token DonchianExpert.mq5 45 1
declaration of 'Inp_Lot' hides global declaration at line 45 DonchianExpert.mq5 45 28
   see previous declaration of 'Inp_Lot' DonchianExpert.mq5 45 28
'input' - unexpected token DonchianExpert.mq5 46 1
declaration of 'Inp_MMode' hides global declaration at line 46 DonchianExpert.mq5 46 28
   see previous declaration of 'Inp_MMode' DonchianExpert.mq5 46 28
'input' - unexpected token DonchianExpert.mq5 47 1
declaration of 'Inp_MagicNum' hides global declaration at line 47 DonchianExpert.mq5 47 28
   see previous declaration of 'Inp_MagicNum' DonchianExpert.mq5 47 28
'input' - unexpected token DonchianExpert.mq5 48 1
declaration of 'Inp_StopLoss' hides global declaration at line 48 DonchianExpert.mq5 48 28
   see previous declaration of 'Inp_StopLoss' DonchianExpert.mq5 48 28
'input' - unexpected token DonchianExpert.mq5 49 1
declaration of 'Inp_TakeProfit' hides global declaration at line 49 DonchianExpert.mq5 49 28
   see previous declaration of 'Inp_TakeProfit' DonchianExpert.mq5 49 28
'input' - unexpected token DonchianExpert.mq5 50 1
declaration of 'Inp_Deviation' hides global declaration at line 50 DonchianExpert.mq5 50 28
   see previous declaration of 'Inp_Deviation' DonchianExpert.mq5 50 28
'input' - unexpected token DonchianExpert.mq5 51 1
declaration of 'InpInd_Timeframe' hides global declaration at line 51 DonchianExpert.mq5 51 28
   see previous declaration of 'InpInd_Timeframe' DonchianExpert.mq5 51 28
'input' - unexpected token DonchianExpert.mq5 52 1
declaration of 'InfoPanel' hides global declaration at line 52 DonchianExpert.mq5 52 28
   see previous declaration of 'InfoPanel' DonchianExpert.mq5 52 28
'input' - unexpected token DonchianExpert.mq5 55 1
declaration of 'DonchianPeriod' hides global declaration at line 55 DonchianExpert.mq5 55 28
   see previous declaration of 'DonchianPeriod' DonchianExpert.mq5 55 28
'input' - unexpected token DonchianExpert.mq5 56 1
declaration of 'Extremes' hides global declaration at line 56 DonchianExpert.mq5 56 28
   see previous declaration of 'Extremes' DonchianExpert.mq5 56 28
'input' - unexpected token DonchianExpert.mq5 59 1
declaration of 'CurStrategy' hides global declaration at line 59 DonchianExpert.mq5 59 28
   see previous declaration of 'CurStrategy' DonchianExpert.mq5 59 28
'input' - unexpected token DonchianExpert.mq5 62 1
declaration of 'ADX_period' hides global declaration at line 62 DonchianExpert.mq5 62 28
   see previous declaration of 'ADX_period' DonchianExpert.mq5 62 28
'input' - unexpected token DonchianExpert.mq5 63 1
declaration of 'ADX_level' hides global declaration at line 63 DonchianExpert.mq5 63 28
   see previous declaration of 'ADX_level' DonchianExpert.mq5 63 28
'input' - unexpected token DonchianExpert.mq5 66 1
declaration of 'InpFastEMA' hides global declaration at line 66 DonchianExpert.mq5 66 28
   see previous declaration of 'InpFastEMA' DonchianExpert.mq5 66 28
'input' - unexpected token DonchianExpert.mq5 67 1
declaration of 'InpSlowEMA' hides global declaration at line 67 DonchianExpert.mq5 67 28
   see previous declaration of 'InpSlowEMA' DonchianExpert.mq5 67 28
'input' - unexpected token DonchianExpert.mq5 68 1
declaration of 'InpSignalSMA' hides global declaration at line 68 DonchianExpert.mq5 68 28
   see previous declaration of 'InpSignalSMA' DonchianExpert.mq5 68 28
'input' - unexpected token DonchianExpert.mq5 69 1
declaration of 'InpAppliedPrice' hides global declaration at line 69 DonchianExpert.mq5 69 28
   see previous declaration of 'InpAppliedPrice' DonchianExpert.mq5 69 28
'input' - unexpected token DonchianExpert.mq5 72 1
declaration of 'Inp_Bars' hides global declaration at line 72 DonchianExpert.mq5 72 28
   see previous declaration of 'Inp_Bars' DonchianExpert.mq5 72 28
'input' - unexpected token DonchianExpert.mq5 73 1
declaration of 'Price' hides global declaration at line 73 DonchianExpert.mq5 73 28
   see previous declaration of 'Price' DonchianExpert.mq5 73 28
'input' - unexpected token DonchianExpert.mq5 74 1
declaration of 'Trend_lev' hides global declaration at line 74 DonchianExpert.mq5 74 28
   see previous declaration of 'Trend_lev' DonchianExpert.mq5 74 28
'input' - unexpected token DonchianExpert.mq5 77 1
declaration of 'RSIperiod1' hides global declaration at line 77 DonchianExpert.mq5 77 28
   see previous declaration of 'RSIperiod1' DonchianExpert.mq5 77 28
'input' - unexpected token DonchianExpert.mq5 78 1
declaration of 'RSIperiod2' hides global declaration at line 78 DonchianExpert.mq5 78 28
   see previous declaration of 'RSIperiod2' DonchianExpert.mq5 78 28
'input' - unexpected token DonchianExpert.mq5 79 1
declaration of 'RSIperiod3' hides global declaration at line 79 DonchianExpert.mq5 79 28
   see previous declaration of 'RSIperiod3' DonchianExpert.mq5 79 28
'input' - unexpected token DonchianExpert.mq5 80 1
declaration of 'RSIperiod4' hides global declaration at line 80 DonchianExpert.mq5 80 28
   see previous declaration of 'RSIperiod4' DonchianExpert.mq5 80 28
'input' - unexpected token DonchianExpert.mq5 81 1
declaration of 'Applied_price' hides global declaration at line 81 DonchianExpert.mq5 81 28
   see previous declaration of 'Applied_price' DonchianExpert.mq5 81 28
'input' - unexpected token DonchianExpert.mq5 82 1
declaration of 'rsiUpperTrigger' hides global declaration at line 82 DonchianExpert.mq5 82 28
   see previous declaration of 'rsiUpperTrigger' DonchianExpert.mq5 82 28
'input' - unexpected token DonchianExpert.mq5 83 1
declaration of 'rsiLowerTrigger' hides global declaration at line 83 DonchianExpert.mq5 83 28
   see previous declaration of 'rsiLowerTrigger' DonchianExpert.mq5 83 28
'input' - unexpected token DonchianExpert.mq5 86 1
declaration of 'UseTrailing' hides global declaration at line 86 DonchianExpert.mq5 86 28
   see previous declaration of 'UseTrailing' DonchianExpert.mq5 86 28
'input' - unexpected token DonchianExpert.mq5 87 1
declaration of 'VirtualTrailingStop' hides global declaration at line 87 DonchianExpert.mq5 87 28
   see previous declaration of 'VirtualTrailingStop' DonchianExpert.mq5 87 28
'input' - unexpected token DonchianExpert.mq5 88 1
declaration of 'parameters_trailing' hides global declaration at line 88 DonchianExpert.mq5 88 28
   see previous declaration of 'parameters_trailing' DonchianExpert.mq5 88 28
'input' - unexpected token DonchianExpert.mq5 90 1
declaration of 'TF_Tralling' hides global declaration at line 90 DonchianExpert.mq5 90 28
   see previous declaration of 'TF_Tralling' DonchianExpert.mq5 90 28
'input' - unexpected token DonchianExpert.mq5 92 1
declaration of 'StepTrall' hides global declaration at line 92 DonchianExpert.mq5 92 28
   see previous declaration of 'StepTrall' DonchianExpert.mq5 92 28
'input' - unexpected token DonchianExpert.mq5 93 1
declaration of 'StartTrall' hides global declaration at line 93 DonchianExpert.mq5 93 28
   see previous declaration of 'StartTrall' DonchianExpert.mq5 93 28
'input' - unexpected token DonchianExpert.mq5 95 1
declaration of 'period_ATR' hides global declaration at line 95 DonchianExpert.mq5 95 28
   see previous declaration of 'period_ATR' DonchianExpert.mq5 95 28
'input' - unexpected token DonchianExpert.mq5 97 1
declaration of 'step_PSAR' hides global declaration at line 97 DonchianExpert.mq5 97 28
   see previous declaration of 'step_PSAR' DonchianExpert.mq5 97 28
'input' - unexpected token DonchianExpert.mq5 98 1
declaration of 'maximum_PSAR' hides global declaration at line 98 DonchianExpert.mq5 98 28
   see previous declaration of 'maximum_PSAR' DonchianExpert.mq5 98 28
'input' - unexpected token DonchianExpert.mq5 100 1
declaration of 'ma_period' hides global declaration at line 100 DonchianExpert.mq5 100 28
   see previous declaration of 'ma_period' DonchianExpert.mq5 100 28
'input' - unexpected token DonchianExpert.mq5 101 1
declaration of 'ma_method' hides global declaration at line 101 DonchianExpert.mq5 101 28
   see previous declaration of 'ma_method' DonchianExpert.mq5 101 28
'input' - unexpected token DonchianExpert.mq5 102 1
declaration of 'applied_price' hides global declaration at line 102 DonchianExpert.mq5 102 28
   see previous declaration of 'applied_price' DonchianExpert.mq5 102 28
'input' - unexpected token DonchianExpert.mq5 104 1
declaration of 'PercentProfit' hides global declaration at line 104 DonchianExpert.mq5 104 28
   see previous declaration of 'PercentProfit' DonchianExpert.mq5 104 28
declaration of 'InpInd_Handle1' hides global declaration at line 106 DonchianExpert.mq5 106 10
   see previous declaration of 'InpInd_Handle1' DonchianExpert.mq5 106 10
declaration of 'InpInd_Handle2' hides global declaration at line 106 DonchianExpert.mq5 106 25
   see previous declaration of 'InpInd_Handle2' DonchianExpert.mq5 106 25
declaration of 'InpInd_Handle3' hides global declaration at line 106 DonchianExpert.mq5 106 40
   see previous declaration of 'InpInd_Handle3' DonchianExpert.mq5 106 40
declaration of 'dcs_up' hides global declaration at line 107 DonchianExpert.mq5 107 10
   see previous declaration of 'dcs_up' DonchianExpert.mq5 107 10
declaration of 'dcs_low' hides global declaration at line 107 DonchianExpert.mq5 107 19
   see previous declaration of 'dcs_low' DonchianExpert.mq5 107 19
declaration of 'close' hides global declaration at line 107 DonchianExpert.mq5 107 29
   see previous declaration of 'close' DonchianExpert.mq5 107 29
declaration of 'adx' hides global declaration at line 108 DonchianExpert.mq5 108 10
   see previous declaration of 'adx' DonchianExpert.mq5 108 10
declaration of 'adx_m' hides global declaration at line 108 DonchianExpert.mq5 108 16
   see previous declaration of 'adx_m' DonchianExpert.mq5 108 16
declaration of 'adx_p' hides global declaration at line 108 DonchianExpert.mq5 108 24
   see previous declaration of 'adx_p' DonchianExpert.mq5 108 24
declaration of 'macd_m' hides global declaration at line 109 DonchianExpert.mq5 109 10
   see previous declaration of 'macd_m' DonchianExpert.mq5 109 10
declaration of 'macd_s' hides global declaration at line 109 DonchianExpert.mq5 109 19
   see previous declaration of 'macd_s' DonchianExpert.mq5 109 19
declaration of 'avs' hides global declaration at line 110 DonchianExpert.mq5 110 10
   see previous declaration of 'avs' DonchianExpert.mq5 110 10
declaration of 'rsi_1b' hides global declaration at line 111 DonchianExpert.mq5 111 10
   see previous declaration of 'rsi_1b' DonchianExpert.mq5 111 10
declaration of 'rsi_2b' hides global declaration at line 111 DonchianExpert.mq5 111 19
   see previous declaration of 'rsi_2b' DonchianExpert.mq5 111 19
declaration of 'rsi_3b' hides global declaration at line 111 DonchianExpert.mq5 111 28
   see previous declaration of 'rsi_3b' DonchianExpert.mq5 111 28
declaration of 'rsi_4b' hides global declaration at line 111 DonchianExpert.mq5 111 37
   see previous declaration of 'rsi_4b' DonchianExpert.mq5 111 37
declaration of 'rsi_1s' hides global declaration at line 112 DonchianExpert.mq5 112 10
   see previous declaration of 'rsi_1s' DonchianExpert.mq5 112 10
declaration of 'rsi_2s' hides global declaration at line 112 DonchianExpert.mq5 112 19
   see previous declaration of 'rsi_2s' DonchianExpert.mq5 112 19
declaration of 'rsi_3s' hides global declaration at line 112 DonchianExpert.mq5 112 28
   see previous declaration of 'rsi_3s' DonchianExpert.mq5 112 28
declaration of 'rsi_4s' hides global declaration at line 112 DonchianExpert.mq5 112 37
   see previous declaration of 'rsi_4s' DonchianExpert.mq5 112 37
'OnInit' - function can be declared only in the global scope DonchianExpert.mq5 116 5
'OnInit' - function already defined and has body DonchianExpert.mq5 116 5
'OnDeinit' - function can be declared only in the global scope DonchianExpert.mq5 180 6
'OnDeinit' - function already defined and has body DonchianExpert.mq5 180 6
'OnTick' - function can be declared only in the global scope DonchianExpert.mq5 187 6
'OnTick' - function already defined and has body DonchianExpert.mq5 187 6
'OnChartEvent' - function can be declared only in the global scope DonchianExpert.mq5 215 6
'OnChartEvent' - function already defined and has body DonchianExpert.mq5 215 6
'BuySignal' - function can be declared only in the global scope DonchianExpert.mq5 225 6
'BuySignal' - function already defined and has body DonchianExpert.mq5 225 6
'SellSignal' - function can be declared only in the global scope DonchianExpert.mq5 256 6
'SellSignal' - function already defined and has body DonchianExpert.mq5 256 6
'GetIndValue' - function can be declared only in the global scope DonchianExpert.mq5 287 6
'GetIndValue' - function already defined and has body DonchianExpert.mq5 287 6

101 error(s), 66 warning(s) 100 67

и как с этим бороться?

 
natyog:
can't open "C:\Program Files\RoboForex - MetaTrader 5\MQL5\include\EasyAndFastGUI\WndEvents.mqh" include file DonchianUI.mqh 6 11

и как с этим бороться?

Для начала подключить библиотеку EasyAndFastGUI, как указано в последнем предложении статьи. Но раз с этим сложности, то прикрепляю архив вместе с библиотекой и материалами статьи.
Файлы:
MQL5.zip  1816 kb
 
natyog:

101 error(s), 66 warning(s) 100 67

и как с этим бороться?

Извините за неудобства, файлы к статье заменили. Скачайте заново и попробуйте скомпилировать, пожалуйста.
 
Не поверите, создал его канал не зная о его существовании )))) наверное как и я подсмотрел у ишимоку... правда подхожу к нему немного с другой стороны, рассматриваю торговлю внутри канала, с помощью фибо уровней с входом у 61 уровня и фиксацией 161. На периоде М5-М15. И пары пунктов на коррекции при достижении 161 уровня.
 
ошибки

'iLow' - override system function Trailing.mqh 241 8

'iLow' - ambiguous call to overloaded function with the same parameters Trailing.mqh 278 36

double iLow(string symbol,ENUM_TIMEFRAMES tf,int index)



и с iHigh тоже самое

'iHigh' - override system function Trailing.mqh 251 8


это не нашел сходу как исправить... похоже что iLow и iHigh теперь описывается по другому....

Исправьте пожалуйста.
 
ruspbtrader:

Статья писалась давно - с тех пор в языке MQL5 появились системные функции iHigh, iLow ...

Закомментируйте в коде эти функции:

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
//double iLow(string symbol,ENUM_TIMEFRAMES tf,int index)
//  {
//   if(index < 0) return(-1);
//   double Arr[];
//   if(CopyLow(symbol,tf, index, 1, Arr)>0) return(Arr[0]);
//   else return(-1);
//  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
//double iHigh(string symbol,ENUM_TIMEFRAMES tf,int index)
//  {
//   if(index < 0) return(-1);
//   double Arr[];
//   if(CopyHigh(symbol,tf, index, 1, Arr)>0) return(Arr[0]);
//   else return(-1);
//  }
 

Закоментировал строки, что выше посоветовали и появились следующие ошибки:

'TrailingStop' - unexpected token, probably type is missing? Trailing.mqh 114 12

'TrailingStop' - function already defined and has different type Trailing.mqh 114 12

Причина обращения: