simple breakout?
-
HI everybody,
i search a simple breakout condition. If 2 emas crossed, draw a horizontal line- if the price break up this line, take a buy trade.
The ema condition is simple! Draw a horizontal line is simple, too! But I can not give the horizontal line a name
So I can not say: if candel x> "breakout" horizontal line, take a buy trade.Have somebody a idea?
Thanks and greetings! -
Objects can be used without their name, here is an example: http://fxdreema.com/demo/mt4-object-in-loop
To work with the last found object set Not more than... in the first block to 1.
But I will suggest to save that level in a variable and then check it's value. Well, a horizontal line is something that stays there even if the EA is restarted. -
Ok, thanks! How can I save the level in a variable. I have to save the level of the crossover and not the market price! For example: The crossover is 1,3350 and the Marketprice is 1,3300 I have to save 1,3350.
-
At what level you place that horizontal line - this one. Bid, I guess.
-
But i have to place a level for the variable! I don't now the level. The level have to be the crossover!
-
When you use "Draw horizontal line" block it has an option to choose at what price level to draw that line, and by default it is Bid.
Now the problem with your project is that the initial value of that Formula variable is 0 and block 7 is true from the beginning