A script for showing the swap value on a financial instrument. The texts of positive and negative swaps are shown in different colors.
I have been regularly using it for long. For some reasons, it has turned out to be more optimal for me as a script than as an indicator. I’m publishing it since I suppose it may be useful not only for me.
Along with swap values, it displays on the chart:
- Name of the financial instrument. This may be helpful when the chart symbol changes subsequently.
- Date and time of when the values were defined. There can be that swap may changes sometimes, so it may be necessary to run such a script on the chart again.
- i_delete_text_only – if you choose true, then this script will only delete the text set before using the script, and it will not set a new one;
- i_color_plus – color for the text of a positive swap;
- i_color_minus – color for the text of a negative swap;
- i_font_size – font size;
- i_y – distance for the text along the y axis in pixels (referencing from the chart top).
Note: Using this utility, if necessary, is combined with using another one (SD Swap), using which you can show the swap on the Expert Advisors tab either for all symbols or for the symbols selected in the Market Watch window. Utility SD Swap can also show the swap only for the symbols, where swap long or swap short is positive.
MT5 Forex Script Characteristics
Platform: Metatrader 5
Time frames: any.
How to install Screenshot Script in MetaTrader 5 / MT5:
Copy and paste the SD_M_Swap.mql5 files into the MQL5 Scripts folder of the Metatrader 4 trading platform.
Restart your MetaTrader 5 application (assuming it’s currently open) … or Launch your MetaTrader 4 application
You can access this folder from the top menu as follows:
File > Open Data Folder > MQL5 > Script (paste here)
On the left hand side, look for the “Navigator” window and under the “Common” tab, look into the “Scripts” section
Locate the indicator which you have just downloaded into the folder stated in Step 1
Drag (Click and drag) the Script onto the chart (when you want the task to be performed)
your task should now be executed…