Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Day Of Week, Week Of Year and other marks in Data Window and on chart - indicator for MetaTrader 5

Views:
4786
Rating:
(7)
Published:
2024.10.29 14:47
WeekDays.mq5 (10.93 KB) view
\MQL5\MQL5Book\Include\
ArrayUtils.mqh (4.19 KB) view
DateTime.mqh (2.56 KB) view
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
The indicator WeekDays displays Day Of Week, Week Of Year, Day Of Year or Bar Index in the Data Window, and optionally in labels on the chart.

As usual, the information in the Data Window is updated dynamically according to mouse movements: the name of the day is always promptly updated in the left column, whereas the content of the right column is defined by the settings, specifically the inputs WholePart and FractionalPart. Each of them allows user to select one of the entities to display: Day Of Week, Week Of Year, Day Of Year, Bar Index, or None.
  • WholePart - selector for the number in front of the floating point;
  • FractionalPart - selector for the number after the floating point;
Two selected properties (integer numbers) are combined into a single floating point value for every bar and stored in the indicator buffer. Of course, the buffer made invisible on the chart due to DRAW_NONE style, because its values are synthetic.

For example, for the screenshot below the name of the day is Tue, and the buffer containing Week.DoY (Day Of Year index) shows value 44.302, that is 44-th week and 302-th day of the year, respectively.

The other inputs allows user to specify whether or not to ShowLabels on chart, what FontName, FontSize, FontColor to use, as well as Padding from top/bottom edges, how to Align them (top/middle/bottom), and optional RotationAngle for middle alignment.

Default clrNONE for FontColor means reverse color for current chart background.

Day Of Week, Week Of Year, Day Of Year, Bar Index indicator


Day Of Week


AutoFibo indicator of two last swings based on ZigZag AutoFibo indicator of two last swings based on ZigZag

The AutoFibo indicator is an advanced Fibonacci retracement tool that automatically draws Fibonacci levels based on the ZigZag pattern. This indicator is designed to help traders quickly identify potential support and resistance levels in trending markets.

Swap Monitor Swap Monitor

This service periodically checks swaps for predefined symbols and saves detected changes into CSV-files for further analysis and potential replay (not implemented here). Also it monitors and alerts swap changes of existing positions.

Hammer Indicator Hammer Indicator

The code above is a "Hammer" indicator that detects candlestick hammer formations (bullish and bearish) and inverted hammer formations (bullish and bearish) on a MetaTrader 5 chart. This indicator identifies price reversal patterns by calculating the size and ratio of the candlestick wicks based on adjustable parameters: MaxRatioShortWick, MinRatioLongWick, and MinCandleSize. When a pattern is detected, the indicator displays a colored arrow near the candle’s lowest or highest price according to the pattern’s direction. The code also includes functions to create and delete objects automatically when the indicator is initialized or stopped.

Extreme highs and lows with tick prices Extreme highs and lows with tick prices

Marking the extreme highs and lows (OHLC) together with the extreme bid and ask prices