Вот ещё одна стратегия, сходная, с представленной выше. Тоже на индикаторе Laquerre
http://www.forexpf.ru/forum/index.php?showtopic=395982
В этой стратегии автор использует индикаторы MACD (12, 26, 9) и RSI (3) в одном окне.
Я пока что готового такого индикатора не встречал. На мои запросы с просьбою поделиться указанным индикатором автор стратегии не отвечает. Мог бы кто-нибудь скрестить представленные ниже 2 индикатора в одном окне? То есть нужно чтобы они выводились вместе в одном окне. Естественно новый индикатор должен иметь коэффициент пропорциональности значений выводимых индикаторов. У меня пока что это не получается :o(((. Заранее ОГРОМНЕЙШЕЕ спасибо тому, кто поможет в этом!!!
http://www.forexpf.ru/forum/index.php?showtopic=395982
В этой стратегии автор использует индикаторы MACD (12, 26, 9) и RSI (3) в одном окне.
Я пока что готового такого индикатора не встречал. На мои запросы с просьбою поделиться указанным индикатором автор стратегии не отвечает. Мог бы кто-нибудь скрестить представленные ниже 2 индикатора в одном окне? То есть нужно чтобы они выводились вместе в одном окне. Естественно новый индикатор должен иметь коэффициент пропорциональности значений выводимых индикаторов. У меня пока что это не получается :o(((. Заранее ОГРОМНЕЙШЕЕ спасибо тому, кто поможет в этом!!!
//+------------------------------------------------------------------+ //| ColorOsMA.mq4 | //| duckfu | //| http://www.dopeness.org/ | //+------------------------------------------------------------------+ #property copyright "duckfu" #property link "http://www.dopeness.org/" //---- indicator settings #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 LimeGreen #property indicator_color2 FireBrick //---- indicator parameters extern int FastEMA=12; extern int SlowEMA=26; extern int SignalSMA=9; //---- indicator buffers double OsMAUpBuffer[]; double OsMADownBuffer[]; double OsMABuffer[]; double MACDBuffer[]; double SignalBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- 2 additional buffers are used for counting. IndicatorBuffers(5); //---- drawing settings SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2); SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2); SetIndexDrawBegin(0,SignalSMA); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2); //---- 3 indicator buffers mapping if(!SetIndexBuffer(0,OsMAUpBuffer) && !SetIndexBuffer(1,OsMADownBuffer) && !SetIndexBuffer(2,OsMABuffer) && !SetIndexBuffer(3,MACDBuffer) && !SetIndexBuffer(4,SignalBuffer)) Print("cannot set indicator buffers!"); //---- name for DataWindow and indicator subwindow label IndicatorShortName("ColorOsMA("+FastEMA+","+SlowEMA+","+SignalSMA+")"); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Moving Average of Oscillator | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); //---- check for possible errors if(counted_bars<0) return(-1); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //---- macd counted in the 1-st additional buffer for(int i=0; i<limit; i++){ MACDBuffer[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i); } //---- signal line counted in the 2-nd additional buffer for(i=0; i<limit; i++){ SignalBuffer[i]=iMAOnArray(MACDBuffer,Bars,SignalSMA,0,MODE_SMA,i); } //---- main loop for(i=0; i<limit; i++){ OsMABuffer[i]=(MACDBuffer[i]-SignalBuffer[i]); if(OsMABuffer[i]>0){ OsMAUpBuffer[i]=OsMABuffer[i]; OsMADownBuffer[i]=0; }else if(OsMABuffer[i]<0){ OsMADownBuffer[i]=OsMABuffer[i]; OsMAUpBuffer[i]=0; }else{ OsMAUpBuffer[i]=0; OsMADownBuffer[i]=0; } } //---- done return(0); } //+------------------------------------------------------------------+
//+------------------------------------------------------------------+ //| RSI.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| https://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "https://www.metaquotes.net/" #property indicator_separate_window #property indicator_minimum 0 #property indicator_maximum 100 #property indicator_buffers 1 #property indicator_color1 DodgerBlue //---- input parameters extern int RSIPeriod=14; //---- buffers double RSIBuffer[]; double PosBuffer[]; double NegBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- 2 additional buffers are used for counting. IndicatorBuffers(3); SetIndexBuffer(1,PosBuffer); SetIndexBuffer(2,NegBuffer); //---- indicator line SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,RSIBuffer); //---- name for DataWindow and indicator subwindow label short_name="RSI("+RSIPeriod+")"; IndicatorShortName(short_name); SetIndexLabel(0,short_name); //---- SetIndexDrawBegin(0,RSIPeriod); //---- return(0); } //+------------------------------------------------------------------+ //| Relative Strength Index | //+------------------------------------------------------------------+ int start() { int i,counted_bars=IndicatorCounted(); double rel,negative,positive; //---- if(Bars<=RSIPeriod) return(0); //---- initial zero if(counted_bars<1) for(i=1;i<=RSIPeriod;i++) RSIBuffer[Bars-i]=0.0; //---- i=Bars-RSIPeriod-1; if(counted_bars>=RSIPeriod) i=Bars-counted_bars-1; while(i>=0) { double sumn=0.0,sump=0.0; if(i==Bars-RSIPeriod-1) { int k=Bars-2; //---- initial accumulation while(k>=i) { rel=Close[k]-Close[k+1]; if(rel>0) sump+=rel; else sumn-=rel; k--; } positive=sump/RSIPeriod; negative=sumn/RSIPeriod; } else { //---- smoothed moving average rel=Close[i]-Close[i+1]; if(rel>0) sump=rel; else sumn=-rel; positive=(PosBuffer[i+1]*(RSIPeriod-1)+sump)/RSIPeriod; negative=(NegBuffer[i+1]*(RSIPeriod-1)+sumn)/RSIPeriod; } PosBuffer[i]=positive; NegBuffer[i]=negative; if(negative==0.0) RSIBuffer[i]=0.0; else RSIBuffer[i]=100.0-100.0/(1+positive/negative); i--; } //---- return(0); } //+------------------------------------------------------------------+
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
http://fxovereasy.50webs.com/Example1.html
С сайта можно загрузить необходимые индикаторы для этой стратегии для MT4.
http://fxovereasy.50webs.com/Indicators.html