fxDreema

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

    Spread variable trouble

    Questions & Answers
    3
    6
    357
    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.
    • I
      Ipod last edited by Ipod

      Hi, hope someone can spare some time to assist.

      Just having some issues trying to get variables to work how I want, essentially all I am doing is trying to get the average spread filter to put the average spread value into a variable so I can see it working on the chart, then add that value + the offset and display that on the chart too.

      Am a bit slow, can't figure it out. The comments are just displaying information on the chart to test it's all working.

      9a5e2bb9-45ca-4f5f-843b-33e2f9cf9e05-image.png

      https://fxdreema.com/shared/v73pg0lD

      ATR Base EA.mq5

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

        I don't understand the logic on how to get the 'average spread'. How is it supposed to be calculated?

        (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
        • I
          Ipod last edited by

          The spread filter has an average system built into it, you choose seconds and then an offset.

          I just want to put the data into variable so I can see it function and tweak it.

          So I want to use a long average spread, so keep under a pair volatility during news or close of the day. Say a daily average spread but right now I my variable doesn’t grab the spread so I can see it work. If I have a set spread that needs tweaking for every pair which I don’t want to do.

          Spread filter uses seconds.
          Ea input I use in minutes so, 1 x60 to convert it for the spread filter.
          Offset of 10 for now while testing.

          I want to display the average spread on the chart.
          The average + offset.

          How can I read what the spread filter is putting out in a variable form which I can modify and display?

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

            You can do it with the comment block as per your example. However, I'm afraid what you want would require some custom code. The fxDreema option storing the spread is the one available on the 'market properties' category. That stores the value at this specific moment. What you want is an average value that required memorizing previous values from previous ticks. No block can do that automatically. You will definitely need custom code to get that calculation.

            (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
            • I
              Ipod last edited by

              Thanks, you are very helpful and active here, its a shame because I initially thought as it is collecting the data in that block anyway I would be able to just ping it to a comment somewhere.

              Probably will just have to do some back testing and see if it functions correctly. Thanks again

              P 1 Reply Last reply Reply Quote 0
              • P
                PhiLykia @Ipod last edited by

                @Ipod @l-andorrà The spread value may differ between brokerage houses and it may not be the right decision to use this data in backtests. For the value you would use for each position though:12.png

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

                Online Users

                G
                K
                P
                M
                M
                E

                17
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors