How to scan previous day for engulfing bars
-
Good day @l-andorrĂ and @roar and @fxDreema
i would like to create a string of code for the next scenario
i want the EA to draw order blocks or draw rectangles around engulfing candles but i need it to look back at the previous day to find these candle. so every day at midnight, it should look back to the previous day that just passed and scan it for these engulfing bars.
i managed to create a code that identifies the engulfing bars and draws a rectangle and projects it as a ray to the right ,so im guessing half the job is done , but how now do we scan the previous day?
project : shared/wj3FbVVbc
-
@cyberspace you need to change your candle id value in a loop.
Here is a simplified example https://fxdreema.com/shared/xeDNx924e -
hey @roar ,i cannot see your variables so i cant copy that code into my project because i do not know how you defined the variables
im essencially trying to create something like this, an ea that spots out supply and demand ,basically the last candle before major moves
image url)e url)) -
@cyberspace to see the variables, just download the .mq5 file and then import it to your builder
-
good day @roar ,
I did all that and downloaded it as you said, but when i load t on chart it does not scan back to the previous day prices ,it merely draws the most recent ones.

where as i wasnt it to do this :

-
@cyberspace just select A=No to see all rectangles

-
hey @roar thanks for your timely responses, highly appreciate it
yes its working now , but thing is, it creating multiple , like a whole lot .like the chart is blinking [ wish i could send you a video[
like, its creating copping on copies every second , so when i got o objects i can see hundreds of rectangles
-

the blocks are perfect but it keeps printing a lot of them on top of one another - how do we fix this
-
Just apply some filter. Once per bar
-
yes i had tried that before asking you... once per bar filter then only makes it draw only one rectangle, the most recent one
-
@cyberspace If you are still having issues, can you share the updated project?