Log in or register to download unlimited Forex robots!
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.
What is MT4talk and how its works?
- Total number of registered users: 75,137
- Registered users today: 2
- Newest registered user: Jaymar
- Total number of topics: 11,746
- Total number of posts: 38,560
Online users: 3,296 guests, 124 Members:
777legrand, A'Akeem, Abellanosa Marlon, admin, Ahmad AA, alemanyjosbos, Alireza_mt4, Ananth Kumar, Angel Luis Fernandez Rodriguez, Antonio Pietro Perrino, Antoshka697, Artur Gebka, Aurus, Ayden007, B4FS, Baagia Kusuma Suryadi, baret, bavajan, binhnvhl, Birendranath Bormon, BixLeVert, Ca Andres, clefasm, Daglis, Danieleipj, devendrafulpagar, Dhruv Karyani, Donovan Sissing, dreamscape9999, Edgar Seraphin, Edwyn, Emma211, epifreak, evaluationengineer, forexraheem1, frank70, Giovanni Perricci, hadi360, Happy Most, hhh45, ian.kungu, Ibrahim A Fallatah, Idris47, igor711, janavas, jarexx, Jaymar, jeppmus, jimbos181, joes11, Jonathan Maphanga, Joseph Asare-Kwakye, juans100, ka-bo, Kaboua28, kallhox, kausa1990, KenFongers, kharatm428, Komputerkit, lekiro2003, Lessmoe, Low Koon Yam, MayLing Chai, mb56, mbarekdahi, mbs, Mo Falah, momomitsu, MT4 GTS, Muhammad Shafiq, Mzuh, Neo88, Neuvert Talinio, none211221, nwensi, Olumuyiwa Michael Osikomaiya, onehit, peteaw72, pgeneletti, pharrokh, pigboy, pipsseeker, Prasoon, protraderpak, prs10ce, QuitePrepared2022, Ramir123, Roberto Nati, Santata80, Santiphathum, sasastephe, shafikul1975, Shaner3, Sikani, Sitis, Skorpion2, SrTrader, SulemanAli, suphakonn, ThreeLions, timtugs, tionge, trajanrr, Travis Bolen, TrevorMagwaza, TWA2020, Unnamed, usbios, Vazeer khan, victortanwc168, wagnerg123, walidshahbudin, whahn279, Woody, xv16, yalta1120, Yoqubov, zedeai, zorbafx69, Андрей Мидерс, عادل اليافعي, 熊玉华, 蔡炜杰
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 means unlimited download access in every forum topic and forum post. While some of the uploaded Forex robots are limited till the next update, other robots never get updated, it all depends on the creator of the robot.
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.