EA using conditions based on different time scales
-
Hello to everyone at FXDREEMA. I love the program but I am having a bit of trouble with my EA. I would like the EA to check the current Bull candle on a 15M chart is bigger than the ATR(4) of the previous candle of the 1H chart. Also to pass only once per bar. The EA I produced doesnt seem to reference the 1H chart. Could anybody please help me fine tune this?
Many thanks in advance
-
@papaskindog The logic is correct. However, I would remove the '*10000' part in the 'adjust' box.I guess the ATR value doesn't need any modification.
-
@l-andorrà Thanks for your input. It does seem the logic is correct, however in the MT4 strategy tester it doesn't seem to behave in the correct way because it doesn't reference the hourly chart. The *10000 is required to scale the ATR correctly
-
@papaskindog Are you sure of that? I've created many EAs with different timeframe references and they always worked fine. Is that project the whole project or just a part?
-
@l-andorrà just part of a larger project, but cant move forward until this is working. I was hoping for a whole lot of responses and help on how to get it working but that doesnt seem to be the case
-
@papaskindog it seems to work just fine

-
To check if your EA takes the right H1 ATR value, you can use "comment" block or "log message" to write the ATR values and see for yourself.
-
@roar Many thanks for you input. It does look like it is working correctly on your chart above, but if you check the ATR(4) on the hourly chart on 2nd Jan at 0800 the ATR is 15.5 pips, so therefore the trade should not have been taken unless the 15 min candle is at least 62 pips, as it needs to be 4 * the hourly ATR(4). That is what I want to achieve. Any more suggestions or help would be greatly appreciated
-
@papaskindog maybe its a timezone thing, but my ATR shows 0.00063 there:

Also bear in mind that you have selected candle ID 1. This means trades entered in 0800 hour will check the ATR from 0700 hour. -
@roar Could well be a timezone thing....... I will check it out. Thanks again