Symbols Check Function

thread: Symbols Check Function

  1. #1

    Symbols Check Function

    I found this function in a different thread.... How can I transfer this for this operate? When I put it in one and put it within a start function, it gives me errors... also, is there a way to do it without using a Global factors?

    Global Factors
    Inserted Code string Symbols#91;#93;; int SymbolCount;
    Inserted Code // ------------------------------------------------------------------ //| Creates the variety of pair symbols to assess | // ------------------------------------------------------------------ string CreateSymbolList() string allsyms; string Currencies#91;#93; = AED, AUD, BHD, BRL, CAD, CHF, CNY, CYP, CZK, DKK, DZD, EEK, EGP, EUR, GBP, HKD, HRK, HUF, IDR, ILS, INR, IQD, IRR, ISK, JOD, JPY, KRW, KWD, LBP, LTL, LVL, LYD, MAD, MXN, MYR, NOK, NZD, OMR, PHP, PLN, QAR, RON, RUB, SAR, SEK, SGD, SKK, SYP, THB, TND, TRY, TWD, USD, VEB, XAG, XAU, YER, ZAR; int CurrencyCount = ArrayRange(Currencies, 0); int Loop, SubLoop; string TempSymbol; for(Loop = 0; Loop lt; CurrencyCount; Loop ) for(SubLoop = 0; SubLoop lt; CurrencyCount; SubLoop ) TempSymbol = Currencies#91;Loop#93; Currencies#91;SubLoop#93;; if(MarketInfo(TempSymbol, MODE_BID) gt; 0) ArrayResize(Symbols, SymbolCount 1); Symbols#91;SymbolCount#93; = TempSymbol; allsyms = allsyms TempSymbol n; SymbolCount ; TempSymbol = Currencies#91;Loop#93; Currencies#91;SubLoop#93; m; if(MarketInfo(TempSymbol, MODE_BID) gt; 0) ArrayResize(Symbols, SymbolCount 1); Symbols#91;SymbolCount#93; = TempSymbol; allsyms = allsyms TempSymbol n; SymbolCount ; return(allsyms);

  2. #2
    Member Nighy's Avatar
    42
    If you want help debugging a mistake, you need to at least say what the error is.

    If you set the codes at a library, did you import that library into your EA or indior to use it?

  3. #3
    I'd love to connect that with an array like this

    series Timeframe[] = PERIOD_M1, PERIOD_M15, PERIOD_M30, PERIOD_H1, PERIOD_H4

    Thus I can check these timeframes for all symbols.... I need for it to save some data in a intrie array... one being as it hit a line on the chart (dynamic moving, but have indior for it).... And clocking that period between when hitting that line and another line... period being in minutes

    I am wanting it to ascertain the greatest currency/timeframe mixtures based on some ratios in the storage data

  4. #4
    No,

    I simply bracketed it using the init start () function to compile and test it... with no it states that it needs the start function

  5. #5
    Manually populate the array with symbols that your broker provides? I mean are there greater

  6. #6
    As I would like to learn how to create each component dynamic I can think of when I proceed to EA #2, #3, #4, etc., that they're constructed dynamic and can be used by anybody as can be.... Figured it'd be good practice to not leave matters manual which can otherwise not be

    Rewards is just another part of money/risk management... since this is already a composed function I found, thought it'd be helpful to incorporate into a library... when I learn how to put this in to a library, then it teaches the simple concept of moving all functions to a library and so eliminating the huge chunks of code to make it easier to see and read what's going on in the EA

    I have done that using VBA programming.... I call the functions in the base code so it has hardly any lines... each bit of code is segmented and named so that I understand what it is doing easily and return and fix mistakes in that region.... I greatly appreciate the help in trying to get me up to speed with this... sorry if this is a huge deal... thought it was something little that could be shifted in that code to be used in a library
    https://www.cliqforex.com/attachment...2240002446.mq4

  7. #7
    Would it be feasible for someone developing a library to have the ability to tell me this wasn't able to be compiled as a library so I could learn for the future? Thanks so far! I really like the help you guys are giving and I hope to be able to help others when I get a better grasp of the code and best practices for Foreign Exchange

  8. #8
    Since the code has not yet been identified as a library in the preprocessor directives.

    Near the top there are a few listed that begin with #property, add

    #property library

    there's a ton of information in the help files that can answer about 99% of your questions.

  9. #9
    Thank you.... Some of the stuff in the help files is greek so they don't good when I want something in layman's terms or that's not defined there... I could understand the greek after understanding the English first because I could matchup concepts to it... sorry that I ask a thousand questions, but it's extremely difficult to code my initial EA correctly without being able to question a seasoned programmer in this environment... Metatrader is new to me, and this programming language is new to me...

  •