fxDreema

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

    Check Loss question

    Questions & Answers
    2
    5
    1256
    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.
    • C
      casebefx last edited by

      Hi

      I have a strategy that works on the chart. This strategy opens trades on several pairs.

      I would like to create a strategy that would close the various currency pairs at a certain loss. Expressed as a percentage of the balance.

      For example: I opened EURUSD, GBPUSD, EURJPY, GBPJPY.
      And on a pair GBPJPY loss is -100 USD. (Balance $ 1000) and it is 10 percent of the Balance.
      And now I want to close only GBPJPY - created such a strategy

      http://fxdreema.com/shared/0K4YuZfnc

      but it closes my every position on GBPJPY, regardless of the loss.
      Where a mistake.

      I trade Armadamarkets and prefix is there GBPJPY

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        This block "check loss" is not to be used like this. But I just answered the same question here: topic/2426

        1 Reply Last reply Reply Quote 0
        • C
          casebefx last edited by

          Thx !

          FxDreema you are great 🙂 !

          Best Regards

          Radoslaw

          1 Reply Last reply Reply Quote 0
          • C
            casebefx last edited by

            Just one more question.

            strategy

            http://fxdreema.com/shared/dXN1dMS5b

            I would like to add in the code the " extern ????? Currency = EURJPY " to easily change the currency in the MT4 terminal.
            What should I enter in the code created strategies:

            extern char = EURJPY?
            extern string = EURJPY?

            Please help 🙂

            1 Reply Last reply Reply Quote 0
            • fxDreema
              fxDreema last edited by

              Use string. This char is new for MT4 now, but it's one of these various numeric formats. I don't know what they are thinking, there are more than 10 numeric data types in this "programming language". I never experienced too much of RAM usage with any EA, as a thing those EAs are really small and lightweight, so what's the point... I don't know.

              But anyway, in fxDreema there are some input options, what I can suggest is to define this as a Constant, look on the right side Constants (Inputs). Select "text" there.
              But why you will want to define currency? If it is multicurrency strategy I understand, but if it uses only 1, then it is already defined - the default currency is that on the chart. In other words, when you add EA to EURJPY chart, that EA knows that currency and it will use it as a default.

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

              Online Users

              G
              T
              N
              M
              K
              F

              22
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors