You are not logged in! To download unlimited files you must log in to your forum account!
Become an affiliate of MT4talk.com and earn a recurring commission.
- Earn a 50% commission on every sales you generate.
Join the MT4talk partner program at https://a.paddle.com/join/program/29759
TIP: If you embed this forum topic into your website, you can also add the affiliate link as 1x1 pixel Iframe into your site.
In the above iframe change the link "https://your-affiliate-link.com" to your actual MT4talk affiliate link.
I need some help to program an indicator based on standard indicators: I would like to count numbers of bars, if a specific indicator setting is given, eg. two moving averages are pointing in the same direction. From the first crossing I would like to count the numbers of bars since this crossing. I tried with while and for loops, but I didn't get the right result. To make it clear: the first bar after crossing should get a "1", if condition is still active 2nd bar should get a "2" value. In case of crossing the other direction, it should start with "1" again.
it looks like:
What i am doing wrong?
Thank you in advance[/i][/i]
A27an, a41006688, aaaa, abedjaber1971, Abhialka, Ac Williams, Adamblacky, admin, Agostino Visentini, Ahmad.Q, Ahmed Abdiaziz Mohamed Japanes, Ahmed Salim, AKALLAI86, akinssun, alapia, Alberto Pierobon, Alex Baumgärtner, amigoyoucef7, andraiva, andretombini, antovic, antropos, arappuleeswaran, ariadjogja, Arif365, AZZARRO13, b.filipov, badmanix, betuboxem, bijeljina1956, broke2, brolyssj, Bruno Oliveira, bukhalaf, bukohsk, BUNDER, calvinseanego, candyboy_tushar, carl132, Carlixton, Chánh Phan, Cindy Cãmƥbëƪƪ, cjhenning777, Cocojambo, Cretu Vasile, davbene74, Denis Maxime, Denise Konrad, EAInspirer, ebi50, elishaab, Etsenn, fabiobottoifx, Felixpukiat, fire, flsekme, forex.bvt, forexnfx, Francis Yip, fredd, Gabino, gilfx, Hafiz Mohd, HEMILCO, Herberth Zandomenico, hincer, IGWE, Inokko, Isaac Luciaka, ismaelfiure, jaffarmsh, jaysonajax, Jemz Dorris, Jlccorp, john.solgaard, joindonald, jurv2186, kantod, karnadi, Kemal, krauser010, Kris Cyngiel Ceglarz, Kyosuke Tagawa, lawrencetownsendnz, lee, lmsomni, louis, m.p.s., madoqa, magnosud, mahmoud.abuammuna, mania, MarianNick123, martinfousek67, martinsalva, Mateusz726, mdjindian, metaldgo, Minsoo Seok, mj-business, Mogbolu Simeon, moh55, mt4fx122, MT5, nakatama1, nienhuis2214, nousername, nuno1234, obaydullahsabbir, olegsbajuks, omtei, orchen, oscarudp, otari, Pablor98, padil1988, paksi1972, paolocroci69, pasroc, Paul328, Pavels Gerinovics, pero1994, phoenix-00, podroznik1809, Prashant Davanageri, propa, Pumpumarn, Quan Hoang Nguyen, quintana, Randall, Raymond#7372, Ricard Blas Claro, Richard Chiang, Richierich23, Rigonzalez9, sakhkalyan, sakollip68, Sankiraibi, Saptara Amorn, sarahw, serdg124, shigeichi, Siduduzo Shezi, soltern, Spegas Santun Berseri, stephenokereke, T116, Taufiq Hidayat, thirxx84, ThreeLions, timpte, tobi_ffm, topaz790, totus, tradingralf, tsirouflis, tskabilan, tuisk909, vadvid, vduubus, Vicran, Victoriano, vindiou, Vink92, vrmech, vufx1972, walidshahbudin, Walker Silva, Wei Deng, willfr, Wish Sh, yahavuzan, yama, yingtidarat, Ylts, zedeai, zionbc, Zoltan0013, zooba, zzzpoin, Василь Новосельский, דרור וסרמן
MT4talk is a User Generated Content website. All content uploaded to MT4talk by our users (MT4talk forum members) is User Generated Content.
To use the MT4talk forum, you must agree to these terms! - MT4talk.com is a self-service Forex forum! You can only download open source Forex robots that other forum members are uploading! All Forex robots that tested by the MT4talk EA tester team, is it's a back-test on a real Forex account. The MT4talk EA tester team making the back-test on this website is to give you a starting point, however, you should always make your own test. All tests provided on this forum are provided for education purposes! MT4talk does not provide guarantee or support for the Forex robots listed on the forum!
CFTC RULE 4.41 – HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS, IN GENERAL, ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.
Disclaimer - No representation is being made that any Forex account will or is likely to achieve profits or losses similar to those shown on backtests in this forum. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. Hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. All information on this forum is for educational purposes only and is not intended to provide financial advice. Any statements posted by forum members about profits or income expressed or implied, do not represent a guarantee. Your actual trading may result in losses as no trading system is guaranteed. You accept full responsibilities for your actions, trades, profit or loss, and agree to hold the MT4talk team and forum members of this information harmless in any and all ways.