fxDreema

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

    Using 'Modify Stops' block to risk a fixed amount of cash

    Questions & Answers
    2
    5
    304
    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.
    • refaey
      refaey last edited by

      I would like to use the 'Modify Stops' block to risk a fixed amount of cash.

      So, let's say we have a EURUSD position, size 0.01, with no SL or TP. I would like to use the 'Modify Stops' block (or any other block) to add a stop-loss to risk, say, $100.

      Can someone help me to work out the formula, please?
      Is there any trick or hidden function that I can call?

      Your help is much appreciated.

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

        Fyi, I know how to do the calculation in mt4/mt5 code, i.e. like in this article: https://www.mql5.com/en/forum/123914

        My question is whether we have things like tickvalue stored in an FxDreema variable, or whether I need to calculate this using custom code.

        1 Reply Last reply Reply Quote 0
        • l'andorrà
          l'andorrà last edited by

          There is no block doing that AFAIK. I'm afraid you will have to use custom code.

          (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

          (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

          (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

            Thank you for the reply.

            I have ended up using custom code as suggested. Here's the code if it benefits anyone

            sl_reliable_tickvalue = sl_tickvalue * sl_point / sl_ticksize;
            if ((Digits == 3) || (Digits == 5)) {sl_reliable_tickvalue = sl_reliable_tickvalue * 10;}
            sl_value = (sl_capital_to_risk * stop_loss_percentage /100) / (loop_size * sl_reliable_tickvalue );

            1 Reply Last reply Reply Quote 1
            • l'andorrà
              l'andorrà last edited by

              Thank you very much for sharing.

              (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

              (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

              (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

              Online Users

              S
              A
              M
              R
              G
              T
              G
              Y
              C
              S
              S
              S
              A

              27
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors