Problem with RSI EA
-
Hi - Love FxDreema - huge thanks
I have built an RSI based EA - See Dark Knight in my account.
What I want is that if the RSI Indicator rises to say 75 then I want to open a trade when it crosses below 74 - I am using the X< with different levels from 80 down to 30 how ever the EA seems to be opening trades as it crosses above 70 rather than waiting for it to turn down - The same is happening for buys
Any advise?
Many thanks
-
This works for me:
https://fxdreema.com/shared/3yw4c6XObIn Condition block crossover works like this... let's say we have MA1 vs MA2 and x<
MA1[0] < MA2[0] AND MA1[1] > MA2[1]
where [0] is the current candle, [1] is the previous candle.
When you compare indicator to value, then it will be like this... let's say we have RSI vs 75 with x<
RSI[0] < 75 AND RSI[1] > 75
But I think there are other problems. I wonder why you have so many blocks, all in parallel, with very small difference inside. The chance is that many of these conditions are true at the same thime, and because all of them are connected in parallel, multiple trades will be created. I tried it on M1 and the result is this: http://i.imgur.com/oeiAISl.png
For those parallel connection I can show you this: https://fxdreema.com/demo/mt4-or-logic
What are you trying to do actually? If it's something like trading when RSI rises or falls, then there are two blocks "Indicator rise" and "Indicator fall".
-
Hi
This is what I am trying to do:
On the daily chart - If no trade open and when RSI rises above 70 - wait for RSI to come down - so if it rises to 73.9 when the RSI comes down to 73.0 to open a sell trade because there is a block for this - it only opens the one trade on the 24 hour chart
All of the blocks do have small differences in them so that if the RSI goes up to 75.5 then a trade should open when the RSI hits the 75.0 point as there is a block for this
I want to place a trade at the highest RSI level for sells and the lowest for buys
My problem is that at the moment a trade opens when the RSI crosses above 70 or crosses below 30 meaning that I am in loss (quite a lot) until the RSI returns to the 70 or 30 mark
Does this make sense?
-
I think you need to know (and feel) how things work. Indicators are arrays of data, what the EA knows are all indicator points in the past - there is 1 point with value for every single candle. So RSI can move up/down in the current candle, but when that candle ends, RSI freezes at it's last state and only this value remains.
So how to know when RSI goes from 75 down to 70? It depends, for what time? The easiest thing is to look at the previous candle and the current candle. Or in the last X previous candles? Or you don't care if it reached 75, you may want it to just cross the 70 mark, which can be detected easily - by looking at what was the last RSI value and comparing it to the current value. Or Looking at the value in the previous tick and comparing it to the current tick (if it was above 70 just a while ago and now it is below 70, then it crossed below). The last thing is also a little bit tricky, because this event may repeat few times in few seconds, because the price always moves up and down.
In short - it depends. What I posted above is some easy way to detect such a crossovers, but you may have different requirements, or none, as very often we don't know what we really want, or the thing we think we want can be made in much simpler way.
So... what calculations do you need exactly? But looking at your project... I don't know it looks too weird for me to use tens of blocks to make something that can be explained simply as "crossover".
I can suggest to play with Condition block and blocks in "Indicators" category a little bit. For example, place "Indicator rise" -> "Draw arrow" and see what will happen. Then try something similar with another block. Also use "Indicator tester" to see how indicators work, what values they give to the EA. All this in Visual backtest mode
