Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs 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
  #1 (permalink)  
Old 03-04-2006, 05:25 PM
Junior Member
 
Join Date: Feb 2006
Posts: 1
tim_talmadge is on a distinguished road
Custom Indicator vs EA

Hello All,

I had a custom indicator that I added some code to in order to take trades, in an attempt to convert it into an EA. However, now when I try to attach it to a chart, it won't attach, and MT4 tells me it's not an EA, it's an indicator.

What am I doing wrong? How does MT4 identify a Custom Indicator vs an EA? Even though I have code in their to execute trades, MT4 insists it's an indicator!

Thanks in advance, for your assistance.

Tim
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
  #2 (permalink)  
Old 03-04-2006, 06:16 PM
Mohammed's Avatar
Senior Member
 
Join Date: Mar 2006
Posts: 119
Mohammed is on a distinguished road
Quote:
Originally Posted by tim_talmadge
Hello All,

I had a custom indicator that I added some code to in order to take trades, in an attempt to convert it into an EA. However, now when I try to attach it to a chart, it won't attach, and MT4 tells me it's not an EA, it's an indicator.

What am I doing wrong? How does MT4 identify a Custom Indicator vs an EA? Even though I have code in their to execute trades, MT4 insists it's an indicator!

Thanks in advance, for your assistance.

Tim
Hi Tim,

Indicators:

1- The indcator can't use the Trades Fcuntions.
2- The indicators have to start with one of these lines:
#property indicator_separate_window
#property indicator_chart_window
3- You have to place the indicator in expert/indocators folder and compile it.
4- Indicators can draw lines on the chart.

Expert advisors:

1- Can use Trading Functions.
2- They cann't start with the above 2 lines.
3- You to place the EA in experts folder.
4- Expert advisor cann't draw lines (buffers).
__________________
There is a fine line between freedom of expression and hate literature.

Last edited by Mohammed; 03-05-2006 at 02:38 AM.
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
  #3 (permalink)  
Old 03-05-2006, 02:22 AM
Foreverold's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 274
Foreverold is on a distinguished road
Not completely true, the expert advisor can draw lines, I have several that will draw lines, attached is my modified version of the hans123. buy and sell lines have been added.
I have others that draw fib lines, etc
use your imagination and you can put anything in the ea.
Attached Files
File Type: mq4 Hans123Trader_v8m1_1_R.mq4 (16.5 KB, 165 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
  #4 (permalink)  
Old 03-05-2006, 02:36 AM
Mohammed's Avatar
Senior Member
 
Join Date: Mar 2006
Posts: 119
Mohammed is on a distinguished road
Lightbulb

Quote:
Originally Posted by Foreverold
Not completely true, the expert advisor can draw lines, I have several that will draw lines, attached is my modified version of the hans123. buy and sell lines have been added.
I have others that draw fib lines, etc
use your imagination and you can put anything in the ea.
Foreverold,
The lines I meant are the Buffers that the indicators can draw (ex: moving average , cci etc) while the expert advisors can't.

The only way to see the buffers used in the EA is in the backtesting - after testing the EA click Open Chart button.

P.S: I hope to see this feature in MetaTrader soon.
__________________
There is a fine line between freedom of expression and hate literature.
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
  #5 (permalink)  
Old 03-05-2006, 03:02 PM
Foreverold's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 274
Foreverold is on a distinguished road
True,
the buffers (setindexbuffer) function is not allowed
So if you wanted to include your complete system into 1 file as an expert advisor, you can not, but it could be added using the icustom feature, unless
metaquotes takes that away as well.

did you know in the new version 191 you now get an error if you try to get pivot levels using the same code you were using in version 190 (high + low + open) /3 what else will they remove?
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
  #6 (permalink)  
Old 03-05-2006, 03:09 PM
Mohammed's Avatar
Senior Member
 
Join Date: Mar 2006
Posts: 119
Mohammed is on a distinguished road
Unhappy

I think adding Buffers to the Expert Advisor will make the world of MQL4 programming easier.
Just imagine you can draw the EMAs or the CCIs you use in the EA on the chart.

The programmers of the EA have to make an indicator as a visually aid for the user
(Example: EMA CROSS + EMA_CROSS_IND).
__________________
There is a fine line between freedom of expression and hate literature.
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
  #7 (permalink)  
Old 05-08-2006, 11:37 AM
babarmughal's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 315
babarmughal is on a distinguished road
Smile

Hi Guys,

So how easy is it to convert the Indicator to EA....are there any speciall lines to add or delete...???????

Thanks
Babar
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
  #8 (permalink)  
Old 05-08-2006, 01:16 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Quote:
Originally Posted by babarmughal
Hi Guys,

So how easy is it to convert the Indicator to EA....are there any speciall lines to add or delete...???????

Thanks
Babar
Babar,

You can't convert an indicator to EA, they are completely different programs.
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
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
  #9 (permalink)  
Old 05-08-2006, 01:38 PM
Member
 
Join Date: Mar 2006
Posts: 36
Mukesh is on a distinguished road
Smile Indicators to work with EA

How do I make an EA to trade on indicators functions ?
for example if I want EA to take positions on any particular indicator,
can it be done ?

Thanks in advance.

Mukesh
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
  #10 (permalink)  
Old 05-08-2006, 03:09 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Quote:
Originally Posted by Mukesh
How do I make an EA to trade on indicators functions ?
for example if I want EA to take positions on any particular indicator,
can it be done ?

Thanks in advance.

Mukesh
Sure! That what the EAs are for!
You build an EA based on one or more indicators to automate your trades!

There are two kinds of indicators in MQ4:

Built in indicators:
i.e. Moving Average, MACD, Bollinger bands etc.
To use these indicators you use their built in functions: i.e. iMA(), iMACD() and iBands().

Custom indicators:
These are the indicator you downloaded from the net and you can use them in your MQ4 EAs by using the iCustom function.


For more details please review my tutorial at:
http://www.metatrader.info/node/34
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Using Custom Indicator in EA (MT4) jimven Setup Questions 8 06-06-2009 03:45 PM
Need an MT4 custom indicator wadeboxjr Metatrader 4 1 08-22-2006 09:50 PM
Custom Indicator Help FX-Hedger Indicators - Metatrader 4 4 03-05-2006 02:26 PM
Custom Indicator Roets Setup Questions 1 01-03-2006 08:54 AM
using a custom indicator forextrend Metatrader 4 2 12-02-2005 02:36 AM


All times are GMT. The time now is 07:29 PM.



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