Only fist candle
-
so basically, i am trying to run an EA that takes trades whenever 20 MA is above 50, and MACD is above main is above signal line, and RSI is above 55
problem is that i dont want EA to take trade every time those parameters are valid, but only on the first candle that they are validso if for example EA takes trade and immediately hits TP, it shuudnt right away open new trade jut because parameters are still there, but rather wait for the conditions to be invalidated (RSI droping below 55 for example) and then only take trade once they become valid again.
did i explain myself correctly?
-
Do you have a project to begin with? If so, could you please share it for us to fix it?
-
-
-
can you please give a small explanation as to what you did in that link?
-
@eli Firstly, I strongly recommend you to adjust all your condition blocks to candle ID 1 on both operands.
Secondly, you can create a few variables controlling exactly what you need. Boolean ones would do the job. They would be initialized as false on the initial settings and would change to true immediately after your buy is open. Then all conditions should change again as far as your indicators retake the desired values.
-
@eli Aditionally you might switch off you trade open blocks. However, you have to care also to enable those blocks again deoending on the conditions you specify to be a "new" market situation and want to enter again.