activate a condition for four 4H candles only
-
Hello Traders
I've been searching here for anyone had same question didn't find any so,
Lets say Stoch main line and signal line crossed up, that will activate a condition that would happen(on) for the next four 4H candles only if the condition didn't meet than back to normal again.
I would appreciate your help Thanx and happy weekend ahead.
-
Any suggestions ??
-
Hi @jtex555 ,
Sorry, I'm not sure if you're meaning the Stoch lines cross one another, or both cross something else.- If crossing one another you only need x1 of the first Condition blocks where you specify Signal x>/x< Main then in the More Settings section specify the Timeframe for each side, or only one if you prefer...
You might like to link your Timeframe settings as Constants or Variables for testing other timeframes.
Though the variable inputs in MT4/5 are a little cumbersome (https://fxdreema.com/forum/topic/5289/timeframe-as-input) - If you're checking if both Main and Signal have crossed something else, then you'll need to use x2 Condition blocks, one for each.
For all blocks, the yellow output is the FALSE condition you mention if you need to direct processing flow somewhere.
Note that you'd only use the yellow outputs if you actually have something you want to do if your conditions aren't met.
- If crossing one another you only need x1 of the first Condition blocks where you specify Signal x>/x< Main then in the More Settings section specify the Timeframe for each side, or only one if you prefer...
-
@drayzen Thanx for your respons
Maybe my question wasn’t clear, the main idea is not about the timeframe or crosses of stoch, the question is about activing (switch it to On) a Condition up to 4 candles only in any timeframe than switch it off if it didn’t meet my other condition command . Hope it’s more clear
Thanx again -
You need to learn variables, and use 2 of them:
one variable as a trigger (for example, "trigvar=1" when activated and "trigvar=0" when deactivated)
and other variable to keep track of time (on every bar, "barcount=barcount+1")
To stop your process: if "trigvar=1" then check if "barcount > 4" -> if true, "trigvar=0"It probably looks difficult, but I trust you will find how to do it

-
Hi @jtex555 ,
I actually just used the Indicator falls within limits block for the first time and it sounds like what you're after.
https://fxdreema.com/shared/SwJ2mrNPc
In this example the Condition block is for C0 and the Indicator falls within limits is for C1+n.
You can even specify a number of candles in the range that can be out of your limits.