Log in or register to download unlimited Forex robots!
PRO Member - Yearly Subscription
Creating Function to count number of opened Currency Pairs
Could anybody please assist me as I don't know where I got this code wrong.
I am trying to create a function named "OrdersTotalSymbolOpen()" to check for open trade on any of the following pairs namely EURUSD, GBPUSD, USDJPY, EURJPY and GBPJPY. It assigns value 1 to any pair that is currently open otherwise the value will be equal 0.The function is to return the value of variable "TotalCount" which is the sum of the number of pairs opened out of the 5 pairs.
The problem is that it keeps returning value "0" even when the 5 pairs are opened.
I attached the code for your perusal and correction. Thanks for your anticipated cooperation.
- Total number of registered users: 73,430
- Registered users today: 5
- Newest registered user: pahalas
- Total number of topics: 11,747
- Total number of posts: 38,504
Online users: 3,133 guests, 142 Members:
admin, Afnan Al-mustafa, Ahaf, aki4601, Alexander Lamount Knowles, AnaanHamdaan, antorita2, Asanda20, basem2022, Ben Omachi, BENEX, BENJAMIN@2018, Bog Min, Boiki jakoba, brian_p_5, Bukola16, BUNDER, CAI, CharlesMa$, ColonelTVS, comitpro, Cramia, cyazhan, dave242k, Derpdarb, doanhtuan91, Donizeti, dsagra, Dung Pham Quoc, dvorac, EA Tester Team Manager, EdwinLord, ehabali, Elisabeta Caramalau, elmina12, epifreak, evefr1140, fbnz, Forbz, Gee2627, gits007, godmode, gr8adroit, guilecs18, HawkesburyTrader, Houman Ahouman, Hrithik7866, iamrex, IB, Iebie Car Serpong, iffikhan, Ivantius, jaja2022, janamilton, Johnny Walker, Jonathan Houle, Kagisho, Kale7, Kalum1976, Kamza22, kennij21, kiddysmall, Kronos Finance, laurent.teitgen, Lea13, live1985, mady_leroy, maestropl, maia, Malcom Mudhungwaza, Manguele, Marco Jäger, Masixole, memo666, milky23, Mina Ibrahim, minhtuyenfx, Minsoo Seok, Mirec28, Mohammad Hakim, momogeek78, Mubarak11, m_peyman2000, Nabil Moulay, Nceba Nyembezi, nicetpad2, nickio, oldrosewood, Opukeye, pahalas, palou70, peteaw72, phantom2479, ramanirahulk, rasoad, riegel94, RK Aakash, Ronforex, rtm10110, Sabeeb Sb, samer_palstine, sasastephe, shadmanmirza, Shael, Shakil, shitlhanguwarrena, Shivansh007, Shugafx, Sohaf, songlinzai, star292, Stevvictory Chidubem, stockalert.dereck, sunny7day, sureshquest, Tan Han Kun, tayeb54, Thabo Kgwefane, theilusionist22, Thonnie Noegraga, ThreeLions, Thuong Tran, traderodin, tradingralf, TripNjabulo, Trustgee2022, tskabilan, tueminh, Ugotv, uhmadh, unmolesting, Vansana Laxachak, viborex, victortanwc168, walidshahbudin, Wolfgangh, wuxianyan, xv16, zohaan5555, ทัศไนย ภุมวิภาชน์, ศุภจักร ใยสำลี, 彌久末 祐基
MT4talk is a User Generated Content website. All content uploaded to MT4talk by our users (MT4talk forum members) is User Generated Content. Please note that MT4talk doesn't sell Forex robots and does not provide support for the uploaded Forex robots. MT4talk only sells PRO membership. PRO membership is unlimited download access in every forum topic and forum posts.
We testing Forex robots in REAL-TIME! We testing some robots on a demo account but in real-time. We are not financial consultants and we can't push you to risk your money. We are just trying to find good market analysis solutions from different strategies to help our community.
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 or the MT4talk EA Tester Team 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.
Affiliates Disclaimer - The site may contain links to affiliate websites, and we receive an affiliate commission for any sign up that trade by you on the affiliate website using such links. Our affiliate partners includes the following: FXOpen, FBS, LQDFX, MyForexVPS.