Sometimes, I post a sort of chart pattern analysis that often consists of channel patterns — descending, ascending or horizontal. They all share some common traits:
Recently I have been asked by one of the blog readers about how do I draw the entry/target channels at 10%/100% distance of the channel’s height accurately. Until yesterday, I did it this way:
Yesterday, I have decided to code a MetaTrader 4 script that would do all this automatically. Now, all I need to do is only to place the initial Border channel, name it “Border” and run the script. It will do all the calculations and place the 10%/100% channels completely by itself. Unfortunately, MetaTrader does not support input parameters for scripts, but the percentage levels and some other properties can be easily modified via the script’s source code: Thanks to Medhat Ramses, you can now easily modify all the parameters of the script via MetaTrader native Inputs tab.
You can download the .mq4 file of the script or the same source code in .zip. Please do not forget that scripts should be placed in your MetaTrader’s /experts/scripts/ folder.
Update 2013-02-27: The script was updated to work normally when Entry and TP objects are already on the chart. For example, when you have just repositioned the Border channel, running the script will also reposition Entry/TP channels properly.
Update 2013-02-28: The script is now also available for MetaTrader 5: .mq5 and .zip.
Update 2013-04-13: Fixed the error in MT4 version of the script that caused division by zero on horizontal channel processing.
Update 2013-10-01: Input parameters are now working in both MT4 and MT5 versions. Also fixed the type of the style input parameters.
Update 2014-06-05: New version allows drawing
If you have any comments or questions about this channel markup script, please post them using the form below.