• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 4:06pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 4:06pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Another Day, Another Chair, Another Day in the Office 153 replies

Calling Scripts from another file 5 replies

MQL4 Language Most Recent Version is it updated beyond the tutorial on the mql4 websi 6 replies

Calling another Symbols in backtest 5 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 1
Attachments: One Indicator calling another indicator in MQL4
Exit Attachments

One Indicator calling another indicator in MQL4

  • Post #1
  • Quote
  • First Post: Nov 26, 2009 4:35am Nov 26, 2009 4:35am
  •  dawsonsg
  • | Joined Oct 2008 | Status: Member | 126 Posts
Hi Guys,

Can someone please point me in the right direction.

I have an indictor that I am modifying but I want it to call another indicator. Where I am calculating the MA in the code below I want to be able to call another indicator that I have in Metatrader and load the bufer just the same.

for(int i=0; i<limit; i++) ind_buffer1[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);

If someone has or knows of a link where this is demonstrated could they please let me know.

Thanks
Steve
  • Post #2
  • Quote
  • Nov 26, 2009 11:24am Nov 26, 2009 11:24am
  •  CodeMeister
  • Joined Sep 2009 | Status: Making Code While Making Pips | 1,672 Posts
iCustom is the function you are looking for and there are lots of examples in MQL documentation pages. Your indicator must have a SetIndexBuffer call for this to work.
  • Post #3
  • Quote
  • Nov 26, 2009 11:59am Nov 26, 2009 11:59am
  •  tomhliles
  • | Additional Username | Joined Dec 2006 | 163 Posts
i would just edit this indy, look at the very bottom, you can edit ExtMapBuffer1[i]
Attached File
File Type: mq4 MovingAverage MTF.mq4   4 KB | 849 downloads
  • Post #4
  • Quote
  • Last Post: Nov 29, 2009 7:38am Nov 29, 2009 7:38am
  •  dawsonsg
  • | Joined Oct 2008 | Status: Member | 126 Posts
Thanks guys that is great. It did the trick.
  • Platform Tech
  • /
  • One Indicator calling another indicator in MQL4
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2021