Forex
Google

Go Back   Forex Trading > Programming > Metatrader Programming
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-25-2007, 12:29 PM
jeremymgp jeremymgp is offline
Junior Member
 
Join Date: Aug 2007
Posts: 2
jeremymgp is on a distinguished road
Coding Indicators Attached to Indicators

Hello,

I've learnt here:
http://articles.mql4.com/197
that I can attach indicators into other indicators, not just the price.

This is great, but my question is how can I actually code this?

In particular if I have an 8-period SMA and a 32-period SMA - with the SMAs being attached to an MACD not the price - then I'd like to know how I can code this crossover. Normally this would be no problem, but with the indicators being on the MACD not the price I just can't see how to do it. MT4 lets you display indicators on indicators, so surely you can code EAs using them too.

Thanks for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-25-2007, 01:00 PM
omelette omelette is offline
Senior Member
 
Join Date: Jan 2006
Posts: 989
omelette is on a distinguished road
Quote:
Originally Posted by jeremymgp View Post
Hello,

I've learnt here:
http://articles.mql4.com/197
that I can attach indicators into other indicators, not just the price.

This is great, but my question is how can I actually code this?

In particular if I have an 8-period SMA and a 32-period SMA - with the SMAs being attached to an MACD not the price - then I'd like to know how I can code this crossover. Normally this would be no problem, but with the indicators being on the MACD not the price I just can't see how to do it. MT4 lets you display indicators on indicators, so surely you can code EAs using them too.

Thanks for your help.
You need to write an indicator to do this. Use iCustom to populate an array with the MACD attribute you're interested in - probably 'MODE_MAIN'. Then use iMAOnArray to calculate its average.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Max number of indicators in indicators folder? moneyline Metatrader 4 11 04-23-2008 09:18 AM
MT4 indicators comeinvest Indicators - Metatrader 4 0 02-26-2007 12:51 AM
applying indicators on indicators? tradesauce Indicators - Metatrader 4 15 12-17-2006 01:31 PM
How to get values from attached indicators viktoriwan Questions 2 05-24-2006 06:26 PM


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