one candle rule
-
Hi, i am trading in daily time frame, sometimes my algo needs one more day to give me all the signals i need (volume for example). How could i code that with fxDreema? Is that possible?
Regards
-
@svenw8
One more day, what you mean? To get tomorrow's values today?
You get readings from any history candle with the candle ID setting. -
I mean for example:
my confirmation indicator crosses zero line and my other indicators are also good to go, but my volume indicator say no trade. one day later ( once a day opening) all my indicators are still good to buy ( but the confirmation indicator will not give the cross zero line signal again because it did it yesterday but the volume indicator now says volume is there) so i would like to take the trade.. you understand what i mean?^^ this happens maybe 2 of 10 times.
-
@svenw8
Create a parallel copy of your confirmation block, and set the candle ID to 2 (when the first confirmation uses ID 1)
https://fxdreema.com/shared/XcD5FgRdc

-
thank you very much for the help

cheers and a happy new year
-
@roar one more thing, i did some backtesting and it works very nice. thanks again. but now i have one problem left, if it takes a signal to buy or sell and the sl hits before the candle id 2 it opens again a position. is it possible to say " if a buy or sell signal came, ignore the parallel block with candle id2?
Thanks again.
-
@svenw8 Hmm, you might want to use a variable to address that. There are other solutions as well, but variables are the general solution to everything, lol.
- Create a variable barcount:

- Then, set the variable to increase by 1 on every new bar, so the variable keeps track of passed bars.
- When opening trade, reset the barcount to 0
- Now you can make a condition: barcount > 2
This means that trades must have min 2 bars between them.
You can copy the blocks from my example, but you have to set up the variable by yourself, according to the picture above.
https://fxdreema.com/shared/AK0KcrCrb

- Create a variable barcount: