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 01-29-2008, 06:35 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Please check my first EA :)

I did up this EA based on the VQ indicator and called it from the EA with iCustom when VQ signals a Buy and Sell, did I do something wrong?
Attached Files
File Type: mq4 VQ.mq4 (7.1 KB, 122 views)
File Type: mq4 My First EA.mq4 (9.1 KB, 136 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
  #2 (permalink)  
Old 01-29-2008, 07:37 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Doesn't seem to be trading
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 01-30-2008, 11:46 AM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Anyone, please ?
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 01-30-2008, 12:44 PM
Member
 
Join Date: Nov 2006
Posts: 94
tiger_wong is on a distinguished road
Quote:
//+------------------------------------------------------------------+
//| Variable Begin |
//+------------------------------------------------------------------+


double Buy1_1 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 0, Current + 0);

double Sell1_1 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 0, Current + 0);
these condition are same... or did I miss something?

Maybe you can explain further about your idea for this EA? I still don't get it.
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 01-30-2008, 01:06 PM
ellict's Avatar
Junior Member
 
Join Date: May 2007
Posts: 19
ellict is on a distinguished road
Quote:
//+------------------------------------------------------------------+
//| Signal Begin(Entry) |
//+------------------------------------------------------------------+
if (False) Order = SIGNAL_BUY;
if (False) Order = SIGNAL_SELL;
//+------------------------------------------------------------------+
//| Signal End |
//+------------------------------------------------------------------+
Also, no definitive criteria for order signal, the mq4 was generate from a template, ExpertAdvisorBuilder, just re-check variable and signal entry point.
__________________
VPS for Trading
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 01-30-2008, 01:43 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Thanks for responding All I want is for the EA to look at the Indicator(s) and if it says to Buy then Buy and if it says Sell then Sell. Yes, as you can see I used a template and thought all I had to do was put the 'extern' values from the indicator into the Buy and Sell locations. They are the same because it is the same indicator and the indicator puts an Arrow on the chart when to Sell or Buy. Let me know if you need more info. I don't even know if what I want to do is possible the way I want it to work. Basically when the indicator signals Buy or Sell then I want the EA to see that and place the trade.
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 01-31-2008, 03:17 PM
Member
 
Join Date: Mar 2006
Posts: 47
derikb is on a distinguished road
Hi, I've changed the code so that it enter trades. Two versions. One only trade when their is an up or down arrow (My first EA2) and the other one trades when the indicator moves upward so if previous trade was profitable or loss and VQ still moves up it will enter another buy trade. I hope this help.It isn't the best coding but then the EA is spagetti code.

Regards
Derik
Attached Files
File Type: mq4 My First EA.mq4 (9.1 KB, 111 views)
File Type: ex4 My First EA.ex4 (7.4 KB, 41 views)
File Type: ex4 My First EA2.ex4 (7.9 KB, 66 views)
File Type: mq4 My First EA2.mq4 (9.3 KB, 124 views)
File Type: ex4 VQ.ex4 (11.0 KB, 77 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
  #8 (permalink)  
Old 01-31-2008, 03:38 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Quote:
Originally Posted by derikb View Post
Hi, I've changed the code so that it enter trades. Two versions. One only trade when their is an up or down arrow (My first EA2) and the other one trades when the indicator moves upward so if previous trade was profitable or loss and VQ still moves up it will enter another buy trade. I hope this help.It isn't the best coding but then the EA is spagetti code.

Regards
Derik
Ok, thanks allot
Two things;
1 - do I have to use the extra VQ indi you attached? can you post the mq4.
2 - I have four other indicators to add, did you make it simple for me to add the links in the EA to the other indicators?
Like if I wanted to add B Bands or something?

How would I change it to have the EA only trade when all four indicators agree at the same time?

Thanks again.

Last edited by matrixebiz; 01-31-2008 at 03:48 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
  #9 (permalink)  
Old 01-31-2008, 04:03 PM
Member
 
Join Date: Mar 2006
Posts: 47
derikb is on a distinguished road
I think the VQ is the same. You must make sure that you compiled the VQ (ex4).

It is easy to add rules to the current code.

Say you want a MA cross:

double MA10 = iMAdouble iMA( string symbol, int timeframe, 50, int ma_shift, int ma_method, int applied_price, 0)

double MA11 = iMAdouble iMA( string symbol, int timeframe, 50, int ma_shift, int ma_method, int applied_price, 1)

double MA20 = iMAdouble iMA( string symbol, int timeframe, 200, int ma_shift, int ma_method, int applied_price, 0)

double MA21 = iMAdouble iMA( string symbol, int timeframe, 200, int ma_shift, int ma_method, int applied_price, 1)

add the above under the following code:

double Entry1 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 0, 1);
double Entry2 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 0, 2);
double Up2 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 1, 2);
double Down2 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 2, 2);

Then add the following to the entry buy rule:

if (Up2==Down2 && Entry1>Entry2 && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount))))

MA10>MA20 && MA11<M21 && all the other rules. This is a cross up entry.

The change that 4 indicators will be up at the same time will give a few trades. For instance the MA10>MA20 will give trades only when trend is up but a cross only happens every now and then. So use the trend instead of a cross....etc.

Hope this help.
Attached Files
File Type: mq4 VQ.mq4 (7.1 KB, 73 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
  #10 (permalink)  
Old 01-31-2008, 04:24 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,218
matrixebiz is on a distinguished road
Quote:
Originally Posted by derikb View Post
I think the VQ is the same. You must make sure that you compiled the VQ (ex4).

It is easy to add rules to the current code.

Say you want a MA cross:

double MA10 = iMAdouble iMA( string symbol, int timeframe, 50, int ma_shift, int ma_method, int applied_price, 0)

double MA11 = iMAdouble iMA( string symbol, int timeframe, 50, int ma_shift, int ma_method, int applied_price, 1)

double MA20 = iMAdouble iMA( string symbol, int timeframe, 200, int ma_shift, int ma_method, int applied_price, 0)

double MA21 = iMAdouble iMA( string symbol, int timeframe, 200, int ma_shift, int ma_method, int applied_price, 1)

add the above under the following code:

double Entry1 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 0, 1);
double Entry2 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 0, 2);
double Up2 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 1, 2);
double Down2 = iCustom(NULL, 0, "VQ", false,0,5,3,1,5,true,false,true,true,false,true,14 85, 2, 2);

Then add the following to the entry buy rule:

if (Up2==Down2 && Entry1>Entry2 && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount))))

MA10>MA20 && MA11<M21 && all the other rules. This is a cross up entry.

The change that 4 indicators will be up at the same time will give a few trades. For instance the MA10>MA20 will give trades only when trend is up but a cross only happens every now and then. So use the trend instead of a cross....etc.

Hope this help.
Wow
Ok lets say I wanted to add a indicator called QQEA, would I add;
double Entry1 = iCustom(NULL, 0, "QQEA",5,14,4.236, 0, 0);
double Entry2 = iCustom(NULL, 0, "QQEA",5,14,4.236, 0, 1);

under the VQ indicator? how do I know what Shift value to use (0-7)?

Then how would I modify the Buy rule to have VQ and QQEA when agree at the same time?

Last edited by matrixebiz; 01-31-2008 at 05:39 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
qqe ea, My First EA MOD 2indi.mq4, qqea bar, VQ EA MT4, My First EA, VQ EA


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
Check this out!!! tznef Non Related Discussions 15 12-17-2007 09:16 AM
How to check for check for currency symbol tak145 Expert Advisors - Metatrader 4 1 05-12-2007 02:16 PM
Can someone please check this indicator? iboersma Metatrader 4 2 04-17-2006 03:09 PM
Can someone check if this EA is done correctly please !! pikachucom Expert Advisors - Metatrader 4 6 04-04-2006 11:34 PM


All times are GMT. The time now is 06:34 AM.



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