Fellow Squad Members,
One of the first things that I learned in trading from the big "How not to leave your money on the market" book is to monitor spread closely. Here is my tiny solution for MT4 that shows spread markers next to the last candle and displays the spread in pips on the lower left corner of the chart.
Installation and starting:
Download source code from here:
This is an EA and an indicator code so you need to copy it to {MetaTrader4 folder}/experts/ or {MetaTrader4 folder}/experts/indicators 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 or Custom Indicators as FPA=SpreadMarker so just drag over your chart.
Enable Expert Advisors:
If you use the EA 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:
Open Inputs tab: right click on the chart (that shows FPA=SpreadMarker and a smiley on the upper right corner) then from the popup menu click Expert Advisors/Properties (F7).../Inputs tab.
Parameter: Highest_Time_Frame_For_Markers
Possible values: M1, M5, M15, M30, H1, H4, D1, W1, MN
This is the only external parameter: the highest time frame on that you want to see the markers - these don't tell much on let's say a daily chart. Spread printed in numbers are visible anyway on the lower left corner.
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=SpreadMarker 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 font settings (from line "color marker_line_color = ..." to "color error_message_color = ...". 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 "M30" above them for the input parameter "extern string Highest_Time_Frame_For_Markers = ..." (if you like to see spread markers on "H1" also without modifying it all the time when you drag the EA over the chart).
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.
Peter
One of the first things that I learned in trading from the big "How not to leave your money on the market" book is to monitor spread closely. Here is my tiny solution for MT4 that shows spread markers next to the last candle and displays the spread in pips on the lower left corner of the chart.
Installation and starting:
Download source code from here:
This is an EA and an indicator code so you need to copy it to {MetaTrader4 folder}/experts/ or {MetaTrader4 folder}/experts/indicators 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 or Custom Indicators as FPA=SpreadMarker so just drag over your chart.
Enable Expert Advisors:
If you use the EA 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:
Open Inputs tab: right click on the chart (that shows FPA=SpreadMarker and a smiley on the upper right corner) then from the popup menu click Expert Advisors/Properties (F7).../Inputs tab.
| |
Possible values: M1, M5, M15, M30, H1, H4, D1, W1, MN
This is the only external parameter: the highest time frame on that you want to see the markers - these don't tell much on let's say a daily chart. Spread printed in numbers are visible anyway on the lower left corner.
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=SpreadMarker 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 font settings (from line "color marker_line_color = ..." to "color error_message_color = ...". 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 "M30" above them for the input parameter "extern string Highest_Time_Frame_For_Markers = ..." (if you like to see spread markers on "H1" also without modifying it all the time when you drag the EA over the chart).
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: