fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Symbol from market info without any pre- or suffix

    Questions & Answers
    2
    3
    1126
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      trader.philipps last edited by trader.philipps

      Hi I'm currently trying to implement the icefx newsinfo indicator into the tutorial EA. According to icefx manual to make the indicator work in back testing, I need to create a global variable containing the current server time (bt time).
      Example:”NEWS_EURUSD_TIMEOVERRIDE”

      In order to make this a bit more robust, I'd like to calculate the variable name. As it contains the current symbol name, I need it without any prefix or suffix.
      @roar or @miro1360 any idea how to achieve that in an effective manner? Probably it needs some String operations.

      I like to share my knowledge, but expect the others to contribute as well.

      roar 1 Reply Last reply Reply Quote 0
      • roar
        roar @trader.philipps last edited by roar

        @trader-philipps Strings are not my strong suit, but maybe this setup helps:
        https://fxdreema.com/shared/MJqQThQO
        Idea is to use substring function to extract the symbol out, using stringfind to find a starting point.
        https://docs.mql4.com/strings/stringsubstr
        https://docs.mql4.com/strings/stringfind
        0_1580646468245_fe2eb7cf-a290-4576-a12a-68f1fcf2ce67-image.png

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        T 1 Reply Last reply Reply Quote 0
        • T
          trader.philipps @roar last edited by trader.philipps

          @roar Okay, will dig deeper into it once news filter is working. Right now I just do this

          0_1580652143435_68cd63df-aff8-4c57-a9bc-182dff9b4d38-image.png

          Thanks a lot!

          I like to share my knowledge, but expect the others to contribute as well.

          1 Reply Last reply Reply Quote 2
          • 1 / 1
          • First post
            Last post

          Online Users

          S
          G
          L
          K
          H

          14
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors