X> and x< without comparing candles
-
I have been trying alot of different combinations to make a x> or x< happend without comparing last x candles so that its as fast as the condition above and below .
The problem is if you have like 2 lines one above and one below on x pips distance from price , and you want it to sell at the secound when the price crosses below the upper line and buy when it goes above the lower , just once but it has to happend the very secound .
the problem here is that it will buy and sell endlessly because the 2 condtions is true at the same time and that will end your account quick .
I have been looking at Mladens coding in indicators and he used >= lets say the above line and then the =! from the low line i think it was .
But im working with 4 lines right now and have you any ideas how i can do it ?The condition that worked best is fist > above line , pass secounds filter then < above line , it dosnt buy and sell and close on every tick then but i dont know if its right

-
I dont understand exactly what you need
ok lets say you need only one trade opened?
use block No Trade ... or once per bar
or your problem is that you have more indicators which are not crossed in one time and you need take trade when these crosses appears - historical and current? like this picture where fast MA (blue) is crossed slowed MAs one after another?

well ... for this second situation you need flag blocks to save state that cross happens .. or do it in another logic ... start at current candle and look into history ... you see that fast MA is below other slower MAs? you can define this only with last cross:
bMA1 x< rMA1 (blue MA crossed last red MA1)
bMA1 < rMA2 (blue MA is below red MA2)
bMA1 < rMA3 (blue MA is below red MA3)but you can still use crosses but use flag blocks to memorize state ... how to do it I showed somewhere in my previous comments, again hard to find it
... maybe sometimes I add some tutorial how to work with crosses which are not aligned ... -
Thanks for information !
I will try the flag blocks and see what happends
It seems like it will either take some minutes to do , or take the whole day to make haha 