Help needed to build EA
-
I created an EA that opens a trade when price breaks the open of the day.
Here is the proyect:
fxdreema.com/shared/Jr5X3VxucApparently I'm doing something wrong because the EA doesn't open any trade, but I can't figure out what. Can you take a look at it and tell me what's wrong?
Thanks guys
-
That's due to blocks 3 and 7. You specified crossings from different timeframes (M15 and D1). You should specify the same timeframe on both operands when using the crossing option.
-
Great, thanks again!
-
@l-andorrà still not working.... any other idea?
-
Conditions 1 and 2 are contradictory. You are requiring that one same tick must be above candle open (ID 0, which will happen just once per bar) and simultaneously crossin that level down. That cannot happen. What conditions do you need exactly?
-
Ok. I need my EA to open the trade when price breaks candle's open (ID 0)

-
try changing your candles to 1 and 2. Let them form first,
-
pls disregard my, post. mis read your requirements
-
In my opinion the problem is candle 0 on the daily and candle 1 on the 15 don't corelate. I think you need to use a formula to set the value of the daily OPEN and compare this to you 15min bar
Was thinking something like
.For this type of EA, look at separating you conditions and use tum blocks on and off to fire when conditions are met and reset when not met. As the EA is checked on every tick. My problem is that I keep thinking that once a condition is met it sits ready at the next. This is not correct, it fires from the top on every tick, and will only follow through if all conditions are met straight away.
-
Working on candle ID 0 is never easy. I understand your requirement but you would need more criteri to specify when that price is considered to be breaking. That can happen just two ticks after the candle is created. Wouldn't you need some more conditions to filter cases like that?
-
Thanks guys for your help, I found an easier way, if you are interested to know:
Opinions are welcome!
-
Interesting. I've never used that block on top! How does it work exactly? Is it active for ten minutes only every hour?
-
@l-andorrà the block can pass only once every 10 mins, but I'm still trying to figure out if it is what I need
-
So it passes every ten minutes no matter what? No matter if it is in the middle of the current bar, the begininnig or elsewhere? Interesting.