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: 70,529
- Registered users today: 12
- Newest registered user: ing.morillo
- Total number of topics: 11,708
- Total number of posts: 38,460
Online users: 3,852 guests, 108 Members:
Abbas1991, admin, Ahmed Tanany, Alexander Lamount Knowles, AMA10, annnabelle7, Barry Ashmeed Syne, Bernado Davinci, BigQ, binuvrm, bmzx, Br3n-23, bschumac, bullforyou, Bullilulli, CAI, callmedrew, charlenep1, clifftreadjr, combat7337, denizyaran, dewwing200, dienou76, DRLEXWILSON, EarningSkill, Edward Bunditthanaphat, Elh4k1m, elmina12, EngTong Kho TOng, epifreak, fastlane2021, femo, Franck René, Fuad Thahir, fxvahid.ak, gr8adroit, Harbin, Henry7777777, ing.morillo, jackbrown7056, Jackson113, janavas, JCGfx, jgvanloo, joei007, k.chalat, Katapult, kelisa1502, kelvq, khoinguyen7999, khonza, Khunmon, Klausix, krissuh, Langa Langa, leoford473, LeonJK, Ludwig2012, mars7, Marvee, Massimo Casiglia, mathews1320, mayur.soni, mike1809, mrdhas, Mudric Wily, Namiyr, NextGeneration, nikostorpedo, NURSIRWAN, Ogmplayboy, omidonline, onehit, peteaw72, pky2j2000, Ppggmm, RitZel, ryan205, Salamraya33, schrec633, Seletela94, Shahrul Nizam M. Sapuan, sk456, smilzo21, Stabil, Steven France, suriya90031, Thato Skhosana Trazlo, ThreeLions, tina36576, tkhanfx, Tolkien_12, tskabilan, Tumello Motaung, Uncle Lmk, Vasile Ion, VicMM, VLR, vscrnk, wdmenet, Will777iam, Xaron, Xesed, Xiphos, xv16, yaochengbin, 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 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.