Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
Thread Tools Display Modes
  #41 (permalink)  
Old 03-14-2006, 04:48 PM
Member
 
Join Date: Jan 2006
Location: South Africa
Posts: 66
nesalc is on a distinguished road
Sailor

Thanks a million Sailor - you are a star!!!

Nesalc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #42 (permalink)  
Old 03-14-2006, 07:04 PM
keris2112's Avatar
Senior Member
 
Join Date: Dec 2005
Location: California, US
Posts: 130
keris2112 is on a distinguished road
Quote:
Originally Posted by sailor
Any know where to change in the code so it can be posible use this function on a movingaverage ------ extern string Currency = "NULL";-------- ..

I have tryed to figure where to write rest of code but couldnt.. Newdigital di it somewhile ago with macd.. http://www.forex-tsd.com/attachments...f?d=1135891592 ...

It is my idea to use keris MTF movingaverage for correlation analysis im just wondering how it will look like

sailor
sailor,
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:
  1. Currency (You must use ALL CAPS when you enter a currency for comparison.) - Default is empty, so all you'll see is 1 moving average until you enter a value for this input.)
  2. CorrBars (How many bars back you want the correlation to start.) - Default=100
The MA value for the correlated currency is, by necessity, not correct. (The price for the correlated currency is usually too different than the base currency. You wouldn't be able to see it on the chart, so it is "normalized" to fit.) But, the "look" of the MA is correct, so you should be able to make a good correlation comparison.

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
Attached Images
File Type: gif mtf ma correlation.gif (18.3 KB, 5330 views)
File Type: gif mtf ma correlation 2.gif (14.6 KB, 4959 views)
Attached Files
File Type: mq4 #MTF_MovingAverage Correlation.mq4 (4.9 KB, 1359 views)

Last edited by keris2112; 03-14-2006 at 09:56 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #43 (permalink)  
Old 03-14-2006, 08:53 PM
Senior Member
 
Join Date: Oct 2005
Posts: 223
sailor is on a distinguished road
looks good but i was wondering why i can not attach YEN pairs only reason why is that i think YEN pair is using ehh my english lol .... compare the quote

euro has 1.2000 and usdjpy 117.50 ( look after decimal )

sailor
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #44 (permalink)  
Old 03-14-2006, 09:54 PM
keris2112's Avatar
Senior Member
 
Join Date: Dec 2005
Location: California, US
Posts: 130
keris2112 is on a distinguished road
Quote:
Originally Posted by sailor
looks good but i was wondering why i can not attach YEN pairs only reason why is that i think YEN pair is using ehh my english lol .... compare the quote

euro has 1.2000 and usdjpy 117.50 ( look after decimal )

sailor
I was going to post about that and I forgot. As it is, it doesn't work with some of the pairs because of what you described above. I'm going to have to try to wrap my head around the math to come up with a general multi-purpose formula that will normalize all of them. I think I'll ask Code Guru or Igor for help with that.

I threw that together pretty quickly while on a break at work, so let me work on it tonight and I'll see if I can't get all the bugs worked out.

Also, I updated the indicator so that CorrBarrs defaults to 50 instead of 100. Doesn't really matter what it is, but on the higher timeframes (D1), sometimes the prices seperate so much over say 100 days, that you don't see both MAs on the screen.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #45 (permalink)  
Old 03-15-2006, 05:24 AM
Senior Member
 
Join Date: Oct 2005
Posts: 223
sailor is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #46 (permalink)  
Old 03-16-2006, 01:46 AM
Member
 
Join Date: Dec 2005
Posts: 35
zhu28ming is on a distinguished road
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);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #47 (permalink)  
Old 03-16-2006, 02:26 AM
keris2112's Avatar
Senior Member
 
Join Date: Dec 2005
Location: California, US
Posts: 130
keris2112 is on a distinguished road
Macd-2

zhu28ming,

Here's the MTF version of MACD-2. Remember, you need both the original macd-2.mq4 and the new #MTF_MACD-2.mq4 for it to work.

Keris
Attached Files
File Type: mq4 #MTF_MACD-2.mq4 (4.7 KB, 1332 views)
File Type: mq4 MACD-2.mq4 (2.7 KB, 1151 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #48 (permalink)  
Old 03-16-2006, 05:22 AM
Member
 
Join Date: Dec 2005
Posts: 35
zhu28ming is on a distinguished road
Macd-2

Thanks so much for the help, Keris. It really solved my big problem.

Jingming.zhu
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #49 (permalink)  
Old 03-16-2006, 04:43 PM
Senior Member
 
Join Date: Oct 2005
Posts: 223
sailor is on a distinguished road
Hey

Kerrie or other do u know if it is posible to have like and cloned moving average pips above/ below existing movingaverage?

sailor
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #50 (permalink)  
Old 03-16-2006, 07:21 PM
Senior Member
 
Join Date: Oct 2005
Posts: 223
sailor is on a distinguished road
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 07:24 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
#MTF_WPR.mq4, ABSOLUTE STRENGTH, absolute strength indicator, AbsoluteStrength, AbsoluteStrength_v1.1_mtf, ADX MTF, AlaskanPipAssassin, atr channel, BBMACD, bbsqueeze, bh-ergodic, center of gravity, Coeffoline, custom candle, customcandle, Damiani_volatmeter v3.2, Envelopes, FanSimple4en, fncd indicator, forex, forextrend_v2, fxst3cci, FxTrend v2, fxtsd, histogram, indicators, megatrend, MegaTrend.mq4, mladen, mtf absolute strength, mtf adx, mtf adx indicator, mtf bband, MTF candle, mtf ema, MTF indicator, mtf LaGuerre, mtf ma, mtf macd, mtf megatrend, mtf parabolic, MTF PSAR, mtf qqe, MTF RSI, mtf rsx, mtf stochastic, MTF trendenvelopes, mtf_4tf_has_bar2m, mtf_megatrend_barm_4tfnext, multi, multi time frame, MULTI TIME FRAME indicator, multi time frame stochastic, multi timeframe, multi timeframe indicator, nonlagma v7, NonLagMA_v7.1, NRTR_Rosh_v2eAlert_mtf.ex4, open interest, pipnailer, PowerTrend, powertrend.mq4, qqe mtf, search, TheBuyZoneForex.pdf, timeframe, TrendEnvelopes_v5, trendline, TRO MultiPair, tro sak multipair, voltychoppy, XO_A_H


Currently Active Users Viewing This Thread: 2 (1 members and 1 guests)
xkq3344
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
get current timeframe () or the like.. arm73c05 Metatrader 4 3 02-21-2007 08:51 PM
Timeframe / Shift divergence_trader Metatrader 4 2 02-12-2007 02:04 PM
Multi EAs, multi brokers, same computer hhsmoney General Discussion 6 11-16-2006 09:32 PM
Get current timeframe The_N Metatrader 4 2 09-08-2006 12:40 PM
Multi timeframe through a shift calculation? wananohoshi Indicators - Metatrader 4 2 08-06-2006 11:02 AM


All times are GMT. The time now is 03:51 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.