specified level of price
-
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,0002I 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
-
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?
-
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,0002the 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
-
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.