How to skip certain number of candles?
-
Hi,
How can I skip certain number of candles?"Skip Ticks" let's you skip time under certain conditions, but it doesn't work in the strategy tester when the markets are open for some reason.
https://fxdreema.com/shared/DvlJ4bBZb
(^using the "check consecutive losses" as a condition to skip 12 hours)As an alternative to time, I want to skip number of candles when certain conditions are met, similar to the example above.
Anyone know a solution to this?
Thanks.
-
@rafaels919 Hi!
Working with hours and minutes is always a pain, better avoid them altogether.
- Create a variable skipcandles that increases +1 on every new candle (no conditions for it). Initial value for the variable should be big, like 100
- When you need to "skip", just reset that variable back to 0.
- Now you can check: skipcandles must be above 12 (for example) before new actions
https://fxdreema.com/shared/mQ7gUp3me

-
Hi Roar,
Why is there a "buy now" block connected? I don't think I understand that configuration.
Should I place "Condition:skip period over" block above "No Trade" block? Would be great if you could repeat that here :
https://fxdreema.com/shared/lO7c5qKWThanks.
-
-
@roar It doesn't run on strategy tester for some reason...
-
@roar Nevermind. It runs now. Thanks!
-
@rafaels919 Wait, I noticed a problem in my logic... If there are 3 consec losses, the variable will reset on every new tick. Let me fix that
-
@rafaels919 I moved the "check consecutive losses" to a different tab, this should avoid the loop
https://fxdreema.com/shared/94PPvVwH -
Awesome. It wasn't trading after 3 losses, but now It works well with the "check consecutive losses" in the different tab. Appreciate it. @roar
-
Wait, it doesn't skip actually. Do I have to edit something in your setup for it to skip? @roar
-
@rafaels919 Here's my test. Skipping 12 candles after 3 losses:

Skipping 120 candles after 3 losses:

It seems to be working, at least in some way. How many candles you wish to skip? You can just modify the number in block #5
-
Yeah, that's the only block that I edit.
I'm trying to skip 120 candles, but that configuration didn't work.