SnakeInBorders - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

Real author: accountant
SnakeInBorders calculates the channel filtering the market, which is bounded by two borders BorderTopBuffer[] and BorderBotBuffer[], and calculates the signal MartBuffer[].
Signal Mart behavior within the channel:
When the market rises, the signal line moves away from the lower boundary, crosses the channel and merges with the upper boundary. The opposite is true when the market falls.
When the market moves directionally, the signal line will remain at the appropriate channel boundary. Enlarging the channel width means increasing movement. When markets are volatile, channels become narrower. During the narrowing of the channel, the signal line moves from one boundary to the other within the channel. After reaching the opposite border, the passage begins to widen.
SnakeInBorders can be used independently to compare signal line trends on different timeframes, as well as to build other indicators using Mart instead of bar prices. For indicators like MA, OA, AC, etc. you can set HardCalc = true, for indicators like ZigZag, Channel, etc.. — HardCalc = false, and the MartFiltr value should be chosen in the range 3...5... You can distinguish between true and false peaks: if the peak is in the middle, the Mart signal line does not match the borders.
The indicator uses SmoothAlgorithms.mqh library class (copy it to
This indicator was first implemented in MQL4 and released in the code base on December 19, 2006.

Figure 1. SnakeInBorders indicator
Attachment download
📎 SmoothAlgorithms.mqh (130.2 KB)
📎 SnakeInBorders.mq5 (35.41 KB)
Source: MQL5 #17378
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •