fxDreema

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

    X> and x< without comparing candles

    Questions & Answers
    2
    3
    992
    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.
    • timmyhanke
      timmyhanke last edited by

      I have been trying alot of different combinations to make a x> or x< happend without comparing last x candles so that its as fast as the condition above and below .

      The problem is if you have like 2 lines one above and one below on x pips distance from price , and you want it to sell at the secound when the price crosses below the upper line and buy when it goes above the lower , just once but it has to happend the very secound .

      the problem here is that it will buy and sell endlessly because the 2 condtions is true at the same time and that will end your account quick .

      I have been looking at Mladens coding in indicators and he used >= lets say the above line and then the =! from the low line i think it was .
      But im working with 4 lines right now and have you any ideas how i can do it ?

      The condition that worked best is fist > above line , pass secounds filter then < above line , it dosnt buy and sell and close on every tick then but i dont know if its right 🙂

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by

        I dont understand exactly what you need 😄 ok lets say you need only one trade opened?
        use block No Trade ... or once per bar

        0_1489246540050_upload-47ad3481-f019-4bc0-a134-9c4b8d6bdc23

        or your problem is that you have more indicators which are not crossed in one time and you need take trade when these crosses appears - historical and current? like this picture where fast MA (blue) is crossed slowed MAs one after another?
        0_1489246652511_upload-a9f4ec1d-8b4a-40da-bf52-7c8599f5db4d

        well ... for this second situation you need flag blocks to save state that cross happens .. or do it in another logic ... start at current candle and look into history ... you see that fast MA is below other slower MAs? you can define this only with last cross:
        bMA1 x< rMA1 (blue MA crossed last red MA1)
        bMA1 < rMA2 (blue MA is below red MA2)
        bMA1 < rMA3 (blue MA is below red MA3)

        but you can still use crosses but use flag blocks to memorize state ... how to do it I showed somewhere in my previous comments, again hard to find it 😄 ... maybe sometimes I add some tutorial how to work with crosses which are not aligned ...

        Between trading and gambling is a very small gap, be careful.

        timmyhanke 1 Reply Last reply Reply Quote 0
        • timmyhanke
          timmyhanke @miro1360 last edited by

          @miro1360

          Thanks for information !
          I will try the flag blocks and see what happends 🙂 It seems like it will either take some minutes to do , or take the whole day to make haha 🙂

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

          Online Users

          A
          L
          O
          S
          E
          J
          D
          M
          X
          K
          E
          D

          25
          Online

          146.6k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors