Please help me with this EA that uses a 15 period EMA at the close of the candle as the only indicator in H2 Time
-
Hello friends, please if someone has the good will to help me with this small project to test my strategy, I will greatly appreciate it, the strategy I am testing is very simple, I only use an EMA at the close of 15 periods in H2 timing as indicator, with the AUXUSD asset, if the candle crosses and closes above the 15 EMA, the EA should place a buy, and if the candle crosses and closes below the 15 EMA, then he should place a sell order with BE of 600 pips and the trailing stop it should work according to the table of values that I share in the image below this text...
Try to make the condition blocks cover all the possibilities of false crossings of the candle with the MA, that's why the project has many conditions,
Here I also share the thread of my project so that anyone who wants to help me can do so, thank you very much in advance for your kind contribution friends.My number 1 problem: I can't get the Trailing Stop to work the same as the table in the image below:

My problem number 2: is that I cannot make the EA place all the operations every time it crosses the EMA, there are many buy/sell operations that the EA does not place and I do not know how to make it operate on each candle that crosses and closes. According to the conditions placed in the EA, here I share an image where the problem is circled:

-
I suggest you use ID 1, because ID o close is the currant bid price
-
@jstap Friend, thank you for answering, I honestly don't understand you, sorry I use Google translator and sometimes I don't understand or understand the messages correctly, can you illustrate me with images please if it's not too much trouble, thank you...
-

-
@jstap I made the changes in each configuration of the condition blocks and now it operates less than before, the same error continues

-

-
Alguien puede ayudar por favor?
-
I have already tried several things and the EA still does not operate on all the candles that it should, in addition to the fact that the trailing stop does not meet the parameters I need, can someone please help me?
-
By setting to ID1 things will be 1 candle late, but this isn't always a bad thing. Get this working with one condition, then work out how to add the next, until it does all you need
-
@DragonZueloTrends said in Please help me with this EA that uses a 15 period EMA at the close of the candle as the only indicator in H2 Time:
Alguien puede ayudar por favor?

-
@alok Should I only make this change in the crossing conditions?
-
@alok said in Please help me with this EA that uses a 15 period EMA at the close of the candle as the only indicator in H2 Time:
@DragonZueloTrends said in Please help me with this EA that uses a 15 period EMA at the close of the candle as the only indicator in H2 Time:
Alguien puede ayudar por favor?

ENUM_TIMEFRAMES TimeFrame = PERIOD_CURRENT


-
@DragonZueloTrends said in Please help me with this EA that uses a 15 period EMA at the close of the candle as the only indicator in H2 Time:
@alok Should I only make this change in the crossing conditions?
That's exactly it, under the conditions
-
Ready, Make all the suggested changes, as shown in the image below... I proceed to test the results

-
@alok Now this error appears

-
I already discovered the error, I had to write the constant type like this: ENUM_TIMEFRAMES, I'm trying it now
-
@DragonZueloTrends you have to say 'PERIOD_CURRENT', you can't put PERIOD_CURRENT 'PERIODO' wrong
-
remove the letter 'O'
-
@DragonZueloTrends said in Please help me with this EA that uses a 15 period EMA at the close of the candle as the only indicator in H2 Time:
I already discovered the error, I had to write the constant type like this: ENUM_TIMEFRAMES, I'm trying it now
the error is that you wrote 'PERIOD_CURRENT' wrong, you put 'PERIODO_CURRENT'
-
@DragonZueloTrends said in Please help me with this EA that uses a 15 period EMA at the close of the candle as the only indicator in H2 Time:
Ready, Make all the suggested changes, as shown in the image below... I proceed to test the results


It has to change here too
