Buy/Sell With in a Number of Candles from 1st condition happening
-
Hey Every one , I would like to know what block to put that will check with in how many candles after the 1st condition has taken place .
Example here i want the moving average S (Small) to cross above the moving average M ( Medium) with in 10 candles after the moving average M (Medium) has crossed Above moving average B (Big) and vice versa
Thanks
https://fxdreema.com/shared/FPT9cg6fe -
@thedisliked Have a look in area 20 https://fxdreema.com/shared/YLM9C92Zb.
-
@jstap Thanks for the Idea , Please can you show me how to connect to my blocks because what you sent me is only showing 1 condition block and i have 2 condition blocks . I hope it makes sense what am saying . Thank you
-
@thedisliked This makes no sense to me as there is 8 condition blocks in area 20, the loop at the top will start at 0 then count candles from the cross, the condition blocks go in your tree, you only need 2, logic being check amount of candles the fast ma > slow ma.
-
@jstap Hi I just stumbled upon this post when looking for something else... I am very interested in your project... could you please explain your area 20 in more detail? Especially these lose blocks

-
@alphaomega 71-78 will count the candles starting at 0 from the point of MA cross, can be used for most things like candle<>, indicator <> 0 etc.
78+79 is to put in tree so whenever the loop count is above a set number the tree will pass.
81-88 is how to turn a bool constant/variable true false depending on condition.
89+90 is how to read if a bool condition is true/false, if true the block passes.
-
@jstap excellent job you have done here... thanks . still looking for 71-72 blocks? ..and what is all the lose blocks for.. experiments? If I may ask, can you give a copy of the complete blocks tree? I have changed the mql4 to mql5.. see example.. I am still checking if it works correctly
https://fxdreema.com/shared/qNhWgEv0b -
@alphaomega Pretty much everything works for mt5, every time people asked a question I would use this file to add an example so it isn't necessarily all needed to work together, I also have other ideas that aren't in here.
71-72 will likely be in there somewhere but unsure and they're unnecessary for area 20.