fxDreema

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

    Want to check the distance from latest trade in loop

    Questions & Answers
    3
    4
    389
    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.
    • D
      drrohit7b last edited by

      I am trying to find the distance between the latest trade and the current price.
      For ex: There are buy trade in group 1 and sell trade in group 2. I want to check on each candle open price, what is the distance between the current open price of candle and the open price of the latest trade in each of the group 1 and group 2. Lets say if the distance between the latest buy position in group 1 is >100 pips then buy position will take place else nothing. Similarly for group 2 also.

      I hope, my question is clear.

      Q 1 Reply Last reply Reply Quote 0
      • Q
        q8carpenter @drrohit7b last edited by q8carpenter

        @drrohit7b Hello,

        Start with this and adjust the pips away block accordingly. Then connect the action you need to block 3. This is for group one, and you will need to duplicate but set another to group 2.

        0_1623694471342_pips away.png

        1 Reply Last reply Reply Quote 0
        • D
          drrohit7b last edited by

          I have actually tried it out but it is only for the fixed pips. I want to open trades after 2 conditions have been met.
          Condition 1: Current price is more than 100 pips away from the latest open trade in the loop
          Condition 2: Run condition 1 only once when new candle opens

          I have tried out a lot of things but some or the other errors are popping up. If the code is correct then it fails to performs when chosen long only or short only positions.

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

            @drrohit7b I suggest you to use a variable to store the open price value of the last closed trade. Then you can use this block to compare that distance:

            0_1623767314108_01.png

            (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

            E
            A
            J
            N

            14
            Online

            147.1k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors