|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (214) | Thread Tools | Display Modes |
|
||||
|
Quote:
Try this: #MTF_MovingAverage Correlation It will plot 2 moving averages, 1 for the current symbol and 1 for whatever symbol you enter. You can still set TimeFrame for whatever you want. There are 2 new Inputs:
I hope this is what you want. Let me know if you find anything wrong with it or you'd like something else. I've attached 2 pics to show what it looks like. The pics show the following: EURUSD H4 Chart SMA(13) - D1 TimeFrame SMA(13) - D1 TimeFrame for USDCHF EURUSD H4 Chart SMA(5) - D1 TimeFrame SMA(5) - D1 TimeFrame for GBPUSD Keris Last edited by keris2112 : 03-14-2006 at 08:56 PM. |
|
|||
|
I remmember i had the same problem with the gridbuilder before i posted it a programmer helped me and it should be sommething with divisor i wraped out som of the code from gridbuilder
double Divisor = 0.1/Point; HighPrice = MathRound(High[Highest(NULL,0,MODE_HIGH, Bars - 2, 2)] * Divisor); //SL = High[Highest(MODE_HIGH, SLLookback, SLLookback)]; LowPrice = MathRound(Low[Lowest(NULL,0,MODE_LOW, Bars - 1, 2)] * Divisor); GridS = GridSpace / 10; sailor |
|
|||
|
Multi Timeframe Indicators
Hello, Dear Keris:
Would you please help to convert this MACD-2 to Multi timeframe? Thankd a lot jingming //+------------------------------------------------------------------+ //| macd-2.mq4 | //| Copyright ?2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright ?2004, MetaQuotes Software Corp." #property link "http://www.metaquotes.net/" //---- indicator settings #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 Magenta #property indicator_color2 Yellow #property indicator_color3 White #property indicator_color4 Yellow //---- indicator parameters extern int FastEMA=12; extern int SlowEMA=26; extern int SignalEMA=8; //---- indicator buffers double ind_buffer1[]; double ind_buffer2[]; double ind_buffer3[]; double ind_buffer4[]; //+------------------------------------------------------------------+ //| 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); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2 ); SetIndexDrawBegin(0,SignalEMA); SetIndexDrawBegin(1,SignalEMA); //---- 4 indicator buffers mapping if(!SetIndexBuffer(0,ind_buffer1) && !SetIndexBuffer(1,ind_buffer2) && !SetIndexBuffer(2,ind_buffer3) && !SetIndexBuffer(3,ind_buffer4)) Print("cannot set indicators\' buffers!"); //---- name for DataWindow and indicator subwindow label IndicatorShortName("MACD-2"); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Oscillator | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); double prev,current; //---- 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++) ind_buffer3[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++) ind_buffer4[i]=iMAOnArray(ind_buffer3,Bars,SignalEMA,0,MODE_EMA, i); //---- dispatch values between 2 buffers bool up=true; for(i=limit-1; i>=0; i--) { current=ind_buffer3[i]-ind_buffer4[i]; prev=ind_buffer3[i+1]-ind_buffer4[i+1]; if(current>prev) up=true; if(current<prev) up=false; if(!up) { ind_buffer2[i]=3*current; ind_buffer1[i]=0.0; } else { ind_buffer1[i]=3*current; ind_buffer2[i]=0.0; } } return(0); } |
|
|||
|
ups just forget my last post but if any1 was thinking of the same. use in the indicator property window level add. But kerry do u know why we cant do that on the MTF movingaverage
sailor Last edited by sailor : 03-16-2006 at 06:24 PM. |
|
||||
|
Quote:
See pics. Let me know if it works ok for you. Keris |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/indicators-metatrader-4/1077-multi-timeframe-indicators.html
|
|||
| Posted By | For | Type | Date |
| MTF BB-Squeeze - MQL4 Code Base | Post #1870 | Refback | 07-03-2008 03:32 AM |
| Weekly_HILO. - MQL4 Code Base | Post #2066 | Refback | 06-25-2008 05:45 AM |
| 【隔離スレ】MetaTrader初心者専用3【ゆとり専用】 - MetaTraderまとめWiki | Post #1124 | Refback | 06-22-2008 01:31 PM |
| My MT4 modified indicators and collection - Page 7 | Post #1177 | Refback | 06-22-2008 11:30 AM |
| Weekly_HILO. - MQL4 Code Base | Post #2066 | Refback | 06-20-2008 04:56 AM |
| EESFX | This thread | Refback | 06-19-2008 02:17 PM |
| Signal_Bars_MFI - MQL4 Code Base | Post #2210 | Refback | 06-18-2008 10:24 PM |
| Signal_Bars_MFI - MQL4 Code Base | Post #2210 | Refback | 06-17-2008 06:18 PM |
| Signal_Bars_MFI - MQL4 Code Base | Post #2210 | Refback | 06-16-2008 10:29 PM |
| RSS-袱轢: 托 蓁粫袱鴈顋 夥鞳襃 | Post #1652 | Refback | 06-15-2008 03:06 PM |
| 罷粫袱鴈顋 孟 4 - 吶辷繿褂 琿琺蒟 Forex | This thread | Refback | 06-13-2008 06:00 PM |
| 仍仂亞 | Post #1652 | Refback | 06-12-2008 02:17 PM |
| eNjJPart4 | Post #977 | Refback | 06-11-2008 12:15 PM |
| 亠 亳仆亟亳从舒仂 个仂亠从: 舒亶 2008 | Post #1684 | Refback | 06-09-2008 10:47 AM |
| LinearRegSlope_v1 - MQL4 篁g阪 | Post #1901 | Refback | 06-09-2008 08:52 AM |
| My MT4 modified indicators and collection - Page 7 | Post #1177 | Refback | 06-08-2008 08:54 PM |
| My MT4 modified indicators and collection - Page 7 | Post #1177 | Refback | 06-08-2008 04:15 PM |
| Tro_Range - MQL4 Code Base | Post #1652 | Refback | 06-08-2008 07:06 AM |
| Tro_Range - MQL4 篁g阪 | Post #1652 | Refback | 06-07-2008 09:40 PM |
| 亠 亳仆亟亳从舒仂 个仂亠从: 仆亟亳从舒仂 Tro_Range | Post #1652 | Refback | 06-07-2008 06:32 PM |
| 罷粫袱鴈顋 孟 4 - 吶辷繿褂 琿琺蒟 Forex | This thread | Refback | 06-06-2008 09:38 AM |
| MTF Stochastic 4TF | Post #2168 | Refback | 05-31-2008 02:26 PM |
| My MT4 modified indicators and collection - Page 7 | Post #1177 | Refback | 05-31-2008 05:41 AM |
| LinearRegSlope_v1 - MQL4 Code Base | Post #1901 | Refback | 05-30-2008 01:42 PM |
| LinearRegSlope_v1 - MQL4 Code Base | Post #1901 | Refback | 05-30-2008 09:32 AM |
| LinearRegSlope_v1 - MQL4 Code Base | Post #1901 | Refback | 05-30-2008 05:21 AM |
| Otcfx_b-clock modified V3.2 - MQL4 Code Base | Post #1786 | Refback | 05-27-2008 08:21 AM |
| BZ_TL_SkylineM - MQL4 篁g阪 | Post #1684 | Refback | 05-24-2008 05:49 AM |
| BZ_TL_SkylineM - MQL4 Code Base | Post #1684 | Refback | 05-22-2008 06:16 AM |
| CCI Woodies | Post #2086 | Refback | 05-08-2008 01:35 PM |
| MTF BB-Squeeze - MQL4 篁g 阪 | This thread | Refback | 05-03-2008 09:52 AM |
| sr ZIGZAG indicator - Forex Trade swicki - powered by eurekster | This thread | Refback | 04-29-2008 08:49 AM |
| MTF BB-Squeeze - MQL4 Code Base | This thread | Refback | 04-29-2008 07:45 AM |
| MTF BB-Squeeze - MQL4 Code Base | This thread | Refback | 04-29-2008 07:28 AM |
| CCI Woodies | Post #2086 | Refback | 04-28-2008 02:59 PM |
| CCI Woodies | Post #2086 | Refback | 04-27-2008 04:01 PM |
| FanSimple8_4MEn - MQL4 Code Base | Post #2087 | Refback | 04-26-2008 10:29 PM |
| MTF Macd_Bars - MQL4 Code Base | Post #432 | Refback | 04-25-2008 01:25 PM |
| MTF Macd_Bars - MQL4 Code Base | Post #432 | Refback | 04-25-2008 06:34 AM |
| AMA Slope - MQL4 篁g 阪 | Post #901 | Refback | 04-24-2008 05:36 PM |
| MTF_HI_LOW_v1 - MQL4 Code Base | Post #471 | Refback | 04-24-2008 03:08 PM |
| MTF_HI_LOW_v1 - MQL4 Code Base | Post #471 | Refback | 04-24-2008 10:24 AM |
| AMA Slope - MQL4 Code Base | Post #901 | Refback | 04-23-2008 07:01 AM |
| All ADX, RSI, CCI. - MQL4 Code Base | Post #950 | Refback | 04-23-2008 05:54 AM |
| AMA Slope - MQL4 Code Base | Post #901 | Refback | 04-22-2008 06:43 PM |
| AMA Slope - MQL4 Code Base | Post #901 | Refback | 04-22-2008 05:55 PM |
| MTF Macd_Bars - MQL4 篁g 阪 | Post #432 | Refback | 04-20-2008 01:54 PM |
| MTF_HI_LOW_v1 - MQL4 篁g 阪 | Post #471 | Refback | 04-18-2008 08:06 PM |
| MTF Macd X - MQL4 篁g 阪 | |||