EA FOR ATR
-
I am trying to make an EA for an indicator, which I am at the stage of adding the buy and sell conditions. I want stoplos at 1.5 times the atr and take profit at 1atr. How should I do this? Thanks to anyone who doesn't mind helping me out here!
-
@henpo1975
Here

-
Thank you for even helping, but I had found it. I never really used this to the fullest, so I was unaware that others may have already asked. Thanks much regardless!
-
Dada always use the trailing stops in his examples, but if I have no trailing stop is this connection still correct, or should the sell side be connected to the yellow of the "no trade" condition.Or, should I even be using the "no trade" condition in this case? Thanks
-

-
@HENPO1975
Orange = TRUE
Yellow = FALSEThe logic is good in this case. You will have only 1 running trade at a time.
If you delete the "no trade", the bot can potentially create a new trade on each tick (because the whole code executes on each tick) -
Thanks for your help!
-
@roar It's not taking trades and I have no idea why.0_1552079287098_AROON UP AND DOWN WIN LOSE TEST EA.mq4
-
Did you get any error logged at the Trading Journal when you backtest it?
-
2019.03.08 18:13:39.825 TestGenerator: unmatched data error (volume limit 3350 at 2017.03.28 21:00 exceeded)
-
When I tried the indicators in the list (moving averages), and just swapped out the indicator to one that was available in the drop-down list, it worked. So, it's doing it because of custom indicators for some reason
-
It seems to be a mismatch with the data on different timeframes
-
@josecortesllobat It's the program here, because their indicators work, and my customs do not.
-
It's actually not the program, but that I choosing the wrong inputs for some things. I just tried another indicator of mine, and because it's basic, I got it correct and it worked. So the issue lies in my conditions. Maybe I will run them by you here.
-
@josecortesllobat Here is what I'm trying to figure out. I want to basically buy when the blue line crosses above the red line, and sell when the red line crosses below the blue, but I am unsure which I need to choose where that represents the 2 lines.


I can replicate the sell side if I can figure out whether to use something other than value that it crosses above, or what exactly should be used ther in this instance.
Thanks and sorry to bother.
-
@roar I you have a minute, can you look at the last questions on my thread that I was asking question earlier about? I think you probably understand what I'm missing. Maybe I need the buffer input or something, I'm not sure. Thanks
-
@henpo1975
With custom indicators, the problem can be anything in the inner mechanics... Try different mode-settings, and also try using candle ID 1, instead of ID 0 which is the default.
