fxDreema

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

    specified level of price

    Questions & Answers
    2
    4
    1105
    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.
    • O
      oscarp88 last edited by

      Hello fx drema,

      my question is:is there a block that let me to buid an ea that buy or sell when market reaches specified price levels with some margin ?

      Example:
      Var1=price1=1,37000
      Var2=margin=0,0002

      I want to sell if eur/usd touches 1,37 and then reaches 1,3698(-2 pips)
      I want to buy if eur/usd touches 1,37 and then reaches 1,3702(+2pips)

      Thank you

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

        Using Condition block you can check what is the price at the moment and react when needed, or even better if you place some pending order at that price. I think the question is how do you calculate that price?

        1 Reply Last reply Reply Quote 0
        • O
          oscarp88 last edited by

          The question is how can i insert 2 types of variable(price levels and variation) and than let it buy or sell if markets touches these levels and then goes up or down.
          Example:
          input 1=1,37
          input 2=1,3650
          input 3=0,0002

          the ea musts buy all times that market touches 1,37 and then goes to 1,37002(+ 2 pips),so opens a trade buy at this last price(no pending order).
          In other case,if after had touched 1,37 goes down to 1,3698(-2 pips with input 3=0,0002) opens a trade sell at this last price.
          Same thing for 1,3650.
          How can i do this?

          the input are variables in order to be after optimized

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

            This sounds to me like crossover, but I'm not sure you will like the current crossover in Condition block. Well, you can always construct some crossover rules with few Condition blocks and using "<" and ">". You can use Candle Close/Open or Bid price. For the current candle you can check when Close > 1.37 AND Open < 1.37, this means that the candle crossed the 1.37 line. Or using Bid price, there is a parameter Tick ID, wait for these conditions - Bid[0] (this is the current Bid price) > 1.37 AND Bid[1] (this is the previous Bid price) <= 1.37. I think I prefer to work with candles.

            In Condition block you can find "Adjust" everywhere, put +0.0002 or +input3 (the name of the variable used here) there. I can suggest to read the description of Condition block.

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

            Online Users

            Y
            U
            E

            7
            Online

            146.8k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors