Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


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 04-15-2008, 05:07 AM
Junior Member
 
Join Date: Nov 2007
Posts: 17
tone40@inbox.com is on a distinguished road
Exclamation Currency Heat-map EA

Hello Al here,

Need help to modify the following code line for mt4. this is a line that buys when all of the different 13 indicators are pointing up, I WOULD LIKE TO CHANGE IT SO IT BUYS WHEN 9 OUT OF 13 ARE POINTING UP, DONT CARE WHICH ONES, JUST 9 OUT OF 13, THATS ALL:

if (Buy1_1 > Buy1_2 && Buy2_1 > Buy2_2 && Buy3_1 > Buy3_2 && Buy4_1 > Buy4_2 && Buy5_1 > Buy5_2 && Buy6_1 > Buy6_2 && Buy7_1 > Buy7_2 && Buy8_1 > Buy8_2 && Buy9_1 > Buy9_2 && Buy10_1 > Buy10_2 && Buy11_1 > Buy11_2 && Buy12_1 > Buy12_2 && Buy13_1 > Buy13_2) Order = SIGNAL_BUY;

ANY IDEAS??

IM WILLING TO SHARE THE EA WHEN DONE.

Al
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 05:13 AM
Senior Member
 
Join Date: Sep 2007
Posts: 270
jturns23 is on a distinguished road
Given the small brick of code you provided, it would be impossible to do. Please post code for the EA.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 05:41 AM
Junior Member
 
Join Date: Nov 2007
Posts: 17
tone40@inbox.com is on a distinguished road
Hello,

here is the attachment of the EA. the line posted earlier is under

//Signal Begin(Entry) title as comment.

let me know and thanks for your interest.

the ea is based on the idea of buying the strongest currency vs the weakest one and
selling the weakest currency vs the strongest one, and the way to do that is by comparing these 13 pairs that will affect the eurjpy trade. when 9 pairs out of 13 goes up, the ea should buy the eurjpy, when vice verse, then sell the eurjpy. that simple.

Thanks

Al
Attached Files
File Type: mq4 YourExpertAdvisor(25).mq4 (23.6 KB, 73 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-15-2008, 06:00 AM
Junior Member
 
Join Date: Nov 2007
Posts: 17
tone40@inbox.com is on a distinguished road
Below is a picture of my charts I created based on buying the strongest currency vs the weakest one and vice versa , all based on ideas of Leveragefx.com by Chris

the EA is based on that idea.

Al
Attached Images
File Type: gif usdjpy--.gif (68.3 KB, 467 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-15-2008, 06:43 AM
Senior Member
 
Join Date: Sep 2007
Posts: 270
jturns23 is on a distinguished road
I'm confused. In your first post you want a buy when 9 out of 13 INDICATORS are pointing up. In your next post you want a buy when 9 out of 13 CURRENCY PAIRS are going up. That makes no sense.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-15-2008, 06:47 AM
Senior Member
 
Join Date: Oct 2005
Posts: 302
Bongo is on a distinguished road
if (Buy1_1 > Buy1_2 && Buy2_1 > Buy2_2 && Buy3_1 > Buy3_2 && Buy4_1 > Buy4_2 && Buy5_1 > Buy5_2 && Buy6_1 > Buy6_2 && Buy7_1 > Buy7_2 && Buy8_1 > Buy8_2 && Buy9_1 > Buy9_2) Order = SIGNAL_BUY;

// && Buy10_1 > Buy10_2 && Buy11_1 > Buy11_2 && Buy12_1 > Buy12_2 && Buy13_1 > Buy13_2) Order = SIGNAL_BUY;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-15-2008, 06:50 AM
Junior Member
 
Join Date: Nov 2007
Posts: 17
tone40@inbox.com is on a distinguished road
Ok, to me is the same thing, because I use closing price over MA on all the 13 pairs,

but I guess you are right in the world of programming one has to be precise as to what the ea is supposed to do, so I guess,what I really want is 9 currency pairs out of 13 currency pairs to be aligned, before the buy/sell order is triggered. thats the product Im looking for, hope that helps.

and thanks again for your time.

Al
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-15-2008, 06:55 AM
Junior Member
 
Join Date: Nov 2007
Posts: 17
tone40@inbox.com is on a distinguished road
Quote:
Originally Posted by Bongo View Post
if (Buy1_1 > Buy1_2 && Buy2_1 > Buy2_2 && Buy3_1 > Buy3_2 && Buy4_1 > Buy4_2 && Buy5_1 > Buy5_2 && Buy6_1 > Buy6_2 && Buy7_1 > Buy7_2 && Buy8_1 > Buy8_2 && Buy9_1 > Buy9_2) Order = SIGNAL_BUY;

// && Buy10_1 > Buy10_2 && Buy11_1 > Buy11_2 && Buy12_1 > Buy12_2 && Buy13_1 > Buy13_2) Order = SIGNAL_BUY;
Hi Bongo, I see what you mean, but I have to also consider 10,11,12 and 13 into the equation . the ea has to look over the 13 pairs and find only a combination of 9 pairs aligned in order to trigger the buy/sell, it doesnt matter which combination but it has to amount to 9 pairs; again, looking over 13 pairs total.


thanks

Al
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-15-2008, 09:22 PM
Senior Member
 
Join Date: Feb 2006
Posts: 525
Michel is on a distinguished road
Quote:
Originally Posted by tone40@inbox.com View Post
Hello Al here,

Need help to modify the following code line for mt4. this is a line that buys when all of the different 13 indicators are pointing up, I WOULD LIKE TO CHANGE IT SO IT BUYS WHEN 9 OUT OF 13 ARE POINTING UP, DONT CARE WHICH ONES, JUST 9 OUT OF 13, THATS ALL:

if (Buy1_1 > Buy1_2 && Buy2_1 > Buy2_2 && Buy3_1 > Buy3_2 && Buy4_1 > Buy4_2 && Buy5_1 > Buy5_2 && Buy6_1 > Buy6_2 && Buy7_1 > Buy7_2 && Buy8_1 > Buy8_2 && Buy9_1 > Buy9_2 && Buy10_1 > Buy10_2 && Buy11_1 > Buy11_2 && Buy12_1 > Buy12_2 && Buy13_1 > Buy13_2) Order = SIGNAL_BUY;

ANY IDEAS??

IM WILLING TO SHARE THE EA WHEN DONE.

Al
PHP Code:
int cnt = (Buy1_1 Buy1_2) + (Buy2_1 Buy2_2) + .... + (Buy13_1 Buy13_2);
if(
cnt 8Order SIGNAL_BUY
or, more easy to understand:
PHP Code:
int cnt 0;
if(
Buy1_1 Buy1_2cnt++;
if(
Buy2_1 Buy2_2cnt++;
.
.
.
if(
Buy13_1 Buy13_2cnt++;
if(
cnt 8Order SIGNAL_BUY

Last edited by Michel; 04-15-2008 at 09:29 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-16-2008, 01:55 AM
Senior Member
 
Join Date: Oct 2005
Posts: 328
Perky is on a distinguished road
ive just been using that kind of idea

one way is to......
set up 13 up cariables and 13 down variables
up1....up13
dn1....dn13

set all 13 up to 0 and all down to 0 before reading the indicators

now as each one is true set it to 1
if up1 + up2=up3+up4=up5+up6+...up13==10
then you have 10 out of the 13 true
and viki verki for the downs
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
currency heat map, leverageFX

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
looking for Heat Map indicator lq_sunshine Indicators - Metatrader 4 46 09-10-2008 02:36 PM
Currency Correlations RickW00716 General Discussion 12 08-07-2008 08:59 AM
Currency corelation fxd01 Metatrader 4 23 07-19-2008 12:58 AM
Forex Heat Map Indicator HellGungrave_777 Indicators - Metatrader 4 5 08-02-2007 03:56 PM
multi currency EA [how to?] zamos Expert Advisors - Metatrader 4 1 06-15-2007 10:48 PM


All times are GMT. The time now is 01:29 AM.



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