| New signals service! | |
|
|||||||
| 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 |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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; |
|
|||
|
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 |
|
|||
|
Quote:
thanks Al |
|
|||
|
Quote:
PHP Code:
PHP Code:
Last edited by Michel; 04-15-2008 at 09:29 PM. |
|
|||
|
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 |
![]() |
| Bookmarks |
| Tags |
| currency heat map, leverageFX |
| Thread Tools | |
| Display Modes | |
|
|
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 |