Fellow Squad Members,
Another code I'd like to share with you is a quite special one. I used to spend some time with 'convenience codes' and not only with EAs and indicators or market data analysis. This kind of tools mostly makes**trading platform*more handy by providing common function with fewer clicks or shinier display. I just refurbished this code that simply helps drawing trend lines. If your trading and chart handling habits work with trend lines you can find it quite convenient. And it is a quite good source of mql tricks.
Installation and starting:
Download source code from here:
This is an EA code so you need to copy it to {MetaTrader4 folder}/experts/ folder and then start the trading platform (or close and restart if it had been open). The tool will appear on Navigator panel (open from View menu) among Expert Advisors as FPA=StickyTrends so just drag over your chart.
Enable Expert Advisors:
To use it don't forget to enable Expert Advisors in terminal's Options (menu: Tools/Options - Expert Advisors tab first checkbox). This shows a smiley face on the upper right corner next to the EA's name (otherwise there is an x).
Settings and Parameters:
By technical reasons you can open Inputs tab only right after starting EA when Properties come up. Switch from Common tab to Inputs.
Parameter: Show_Proximity_Circle
Possible values: true, false
Parameter: Proximity_Distance_Pixels
Possible values: positive integer
Stickiness helps you selecting highs and lows on the chart. This tool simply starts drawing trend lines from the closest high or low in a circle around the mouse cursor. First parameter tells the EA that you want to see that circle and the second one defines the radius of that circle.
Operation:
Everything works as normal on the chart but as soon as you hold down the Control key trend line drawing starts. First you can select the starting point:
---––– After this step –––---
Release Ctrl: quit drawing - removes all objects
Single left mouse click: start selecting endpoint
---––– After this step –––---
Release Ctrl: stop drawing - trend line remains
Single left mouse click: start adjusting line length
---––– After this step –––---
Release Ctrl: stop drawing - trend line remains
Single left mouse click: start placing parallel line
---––– After this step –––---
Release Ctrl: finish drawing - trend lines channel remains
Single left mouse click: finish drawing - trend lines channel remains
---––– Whenever you've drawn a trend line –––---
Press Esc: delete last line (works for several seconds)
You can participate:
Tell me and your Squad Members how you like it.
Tell me and your Squad Members how could it be better.
Tell me and your Squad Members if you have any problem while installing or using it.
Who wants to enter the Laboratory:
Right click on Navigator panel/Expert Advisors/FPA=StickyTrends and select Modify. MetaEditor opens up showing the full source code I've written for you.
On the first screen you can find some hidden parameters like colors and styles (from line "color proximity_circle_color = ..." to "double horiz_vertic_sticky_angle = ...". You can change the values after the equal sign (you can use these color names just write them without spaces and be aware of case sensitivity) and even the default setting "true" and "39" above them for the input parameter "extern bool Show_Proximity_Circle = ..." and "extern int Proximity_Distance_Pixels".
After modifying the code press F5 or Compile button on the top. If it writes "0 error(s),..." on the bottom, you have your own new version and you can start using it after going back to MT4 terminal.
Looking forward to hearing your feedback,
Peter
Another code I'd like to share with you is a quite special one. I used to spend some time with 'convenience codes' and not only with EAs and indicators or market data analysis. This kind of tools mostly makes**trading platform*more handy by providing common function with fewer clicks or shinier display. I just refurbished this code that simply helps drawing trend lines. If your trading and chart handling habits work with trend lines you can find it quite convenient. And it is a quite good source of mql tricks.
Installation and starting:
Download source code from here:
This is an EA code so you need to copy it to {MetaTrader4 folder}/experts/ folder and then start the trading platform (or close and restart if it had been open). The tool will appear on Navigator panel (open from View menu) among Expert Advisors as FPA=StickyTrends so just drag over your chart.
Enable Expert Advisors:
To use it don't forget to enable Expert Advisors in terminal's Options (menu: Tools/Options - Expert Advisors tab first checkbox). This shows a smiley face on the upper right corner next to the EA's name (otherwise there is an x).
| |
Settings and Parameters:
By technical reasons you can open Inputs tab only right after starting EA when Properties come up. Switch from Common tab to Inputs.
Parameter: Show_Proximity_Circle
Possible values: true, false
Parameter: Proximity_Distance_Pixels
Possible values: positive integer
Stickiness helps you selecting highs and lows on the chart. This tool simply starts drawing trend lines from the closest high or low in a circle around the mouse cursor. First parameter tells the EA that you want to see that circle and the second one defines the radius of that circle.
Operation:
Everything works as normal on the chart but as soon as you hold down the Control key trend line drawing starts. First you can select the starting point:
---––– After this step –––---
Release Ctrl: quit drawing - removes all objects
Single left mouse click: start selecting endpoint
---––– After this step –––---
Release Ctrl: stop drawing - trend line remains
Single left mouse click: start adjusting line length
---––– After this step –––---
Release Ctrl: stop drawing - trend line remains
Single left mouse click: start placing parallel line
---––– After this step –––---
Release Ctrl: finish drawing - trend lines channel remains
Single left mouse click: finish drawing - trend lines channel remains
---––– Whenever you've drawn a trend line –––---
Press Esc: delete last line (works for several seconds)
You can participate:
Tell me and your Squad Members how you like it.
Tell me and your Squad Members how could it be better.
Tell me and your Squad Members if you have any problem while installing or using it.
Who wants to enter the Laboratory:
Right click on Navigator panel/Expert Advisors/FPA=StickyTrends and select Modify. MetaEditor opens up showing the full source code I've written for you.
On the first screen you can find some hidden parameters like colors and styles (from line "color proximity_circle_color = ..." to "double horiz_vertic_sticky_angle = ...". You can change the values after the equal sign (you can use these color names just write them without spaces and be aware of case sensitivity) and even the default setting "true" and "39" above them for the input parameter "extern bool Show_Proximity_Circle = ..." and "extern int Proximity_Distance_Pixels".
After modifying the code press F5 or Compile button on the top. If it writes "0 error(s),..." on the bottom, you have your own new version and you can start using it after going back to MT4 terminal.
Looking forward to hearing your feedback,
Peter
Last edited by a moderator: