I want to draw the following. i need to find the minimum point for the last 3 candlesticks. compare it with the minimum price of the last 20 candlesticks. if the last 3 candlesticks are lower and the candle is black ( Open[2]>Close[2] ) then look further.
I need to find a bearish takeover ( Open[1]<=Close[2] && Open[2]<Close[1] ).
And open a buy position.
It seems to be correct, but i feel something is wrong.
I have moved the channel drawing indicator to the EA.
Unbalanced parentheses is a constant error, although I have double-checked all brackets.
But my question is different - I need to use these very channels to open trades in the condition, but I don't know how to mark them. I tried just to write the name of an object but I haven't managed to check the correctness of this solution yet.
That's it. I'm all messed up and my head's not working anymore.
here is the code
I want to draw the following. i need to find the minimum point for the last 3 candlesticks. compare it with the minimum price of the last 20 candlesticks. if the last 3 candlesticks are lower and the candle is black ( Open[2]>Close[2] ) then look further.
I need to find a bearish takeover ( Open[1]<=Close[2] && Open[2]<Close[1] ).
And open a buy position.
It seems to be correct, but i feel something is wrong.
I will be very grateful if you can help me.
and open a buy position.
everything seems right, but there is something wrong.
only as far as here.
Nothing further.
only as far as here.
Nothing further.
So, what condition is not fulfilled next? What does Comment or Print tell you?
check if your conditions are fulfilled on the historical data using Print(), like this:
just did what you asked. nothing is happening.
The problem is in this expression
if I removeLow1<Low2 then Open[2]>Close[2] is executed, if I remove Open[2]>Close[2], Low1<Low2 is not executed
Low1<Low2 is not met