snake in borders
Info
The snake in borders is a Indicator for MetaTrader 5 that snakeinborders calculates the channel of a filtered market, which is limited by two borders bordertopbuffer[] and borderbotbuffer[], and it calculates the signal martbuffer[]. //+--------------------------------------------+//| indicator input parameters |//+--------------------------------------------+input smooth_method xma_method=mode_lwma_; //smoothing methodinput uint snakerange=2; //half-period of snake'а axis calculation input int xphase=15; //first averaging parameter,//---- for jjma within the range of -100.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use snake in borders
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
snakeinborders calculates the channel of a filtered market, which is limited by two borders bordertopbuffer[] and borderbotbuffer[], and it calculates the signal martbuffer[].
Typical Use Case
This Indicator excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.
Description & Settings
Related: Day Borders Indicator - another powerful indicator for MetaTrader 5 traders.
snakeinborders calculates the channel of a filtered market, which is limited by two borders bordertopbuffer[] and borderbotbuffer[], and it calculates the signal martbuffer[].
Also recommended: snake in borders ht f - similar indicator with strong performance on MetaTrader 5.
//+--------------------------------------------+//| indicator input parameters |//+--------------------------------------------+input smooth_method xma_method=mode_lwma_; //smoothing methodinput uint snakerange=2; //half-period of snake'а axis calculation input int xphase=15; //first averaging parameter,//---- for jjma within the range of -100 ... +100 it influences the quality of the transition process;//---- for vidia it is a cmo period, for ama it is a slow average periodinput uint filterperiod = 24; // filtering periodinput double martfiltr = 2; // market filtering ratio. the larger the value of martfiltr, the narrower is the filtered market channel. the ratio should be properly selected. default is 2;input bool hardcalc = true;input applied_price_ ipc=price_weighted_;//a price constantinput int shift=0; // horizontal indicator shift in barsinput int priceshift=0; // vertical indicator shift in pointsinput color upper_color=clrmediumseagreen;input color lower_color=clrred;the behavior of the signal mart inside the channel:
when the market moves up, the signal line moves away from the lower border, crosses the channel and merges with the upper border. and vice versa when the market moves down.
when there is a directional market move, the signal line will be held at the appropriate channel border. expanding channel width means strengthening of the movement. the channel becomes narrower during market fluctuations. during channel narrowing, the signal line moves from one border to the other inside the channel. after reaching the opposite border, the channel begins to expand.
snakeinborders can be used independently, comparing the signal line movement on different timeframes, as well as for the construction of other indicators, using mart instead of the bar price. for the indicators like ma, oa, ac,.. you can set hardcalc = true, for indicators like zigzag, channel,.. — hardcalc = false, and martfiltr value should be chosen in the range 3...5... you can differentiate between true and false peaks: if a peak is intermediate, the mart signal line does not match the border.
the indicator uses smoothalgorithms.mqh library classes (copy it to <terminal_data_folder>\mql5\include). the use of the classes was described in detail in the article .
this indicator was first implemented in mql4 and was published in on 19.12.2006.
fig1. the snakeinborders indicator
You may also like: vi d y a n bars borders - excellent alternative for indicator users on MetaTrader 5.
Source Code
/
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.