Hi, I am a new member of this forum. And hopefully I can get some help from you guys.
I have several lower tf bot mostly 3-5min. I need some suggestions for them to not take any trends in big consilidation, like this one today as it has consilidate for ~3 days.
I want the bots to not take trades at all or keep the position until we have a break out.
What do you think is best for this? Bollinger bands? Or ichimoku with chikou (lagging span).
What is your suggestions? Do you have any finished codes I can put in and optimize?
Thank you!
The simplest way is to assume there’s a range going on when the difference from the highest to the lowest prices, in the last N bars, does not exceeds X pips:
N = 50
X = 30 * pipsize
MyHI = highest[N](high)
MyLO = lowest[N](low)
IsRange = (MyHI - MyLO) <= X
other ways:
- two MA’s cross multiple times within the last N bars
- Adx
- Bollinger Bans (or just one of them) sit inside the Keltner Channel
you can surely find more.
Above code added as Log 241 to here
Snippet Link Library
Also consider using the average MAE and MFE (distance between open and high and distance between open and low) in the last x candles. If it is below a longer term average of it or falling consistently then the market is consolidating/going sideways/less volatile.