Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
If you show your attempts, you will most probably receive an answer from the community. Use the CODE button (Alt-S) when inserting code.
Otherwise, you also have the option to hire a programmer in the Freelance section.
If you show your attempts, you will most probably receive an answer from the community. Use the CODE button (Alt-S) when inserting code.
Otherwise, you also have the option to hire a programmer in the Freelance section.
I just need instruction on how go about it. At least mt4 code sample or link to any article on it Pls
below is the class I got from https://www.mql5.com/en/articles/3004 but I don't know how to apply it in my case
class CTextBox : public CElement { private: //--- Displays the text and blinking cursor void DrawTextAndCursor(const bool show_state=false); }; //+------------------------------------------------------------------+ //| Constructor | //+------------------------------------------------------------------+ CTextBox::CTextBox(void) { //--- Setting parameters for the timer counter m_counter.SetParameters(16,200); } //+------------------------------------------------------------------+ //| Timer | //+------------------------------------------------------------------+ void CTextBox::OnEventTimer(void) { ... //--- Pause between updates of the text cursor if(m_counter.CheckTimeCounter()) { //--- Update the text cursor if the control is visible and the text box is activated if(CElementBase::IsVisible() && m_text_edit_state) DrawTextAndCursor(); } } //+------------------------------------------------------------------+ //| Displays the text and blinking cursor | //+------------------------------------------------------------------+ void CTextBox::DrawTextAndCursor(const bool show_state=false) { //--- Determine the state for the text cursor (show/hide) static bool state=false; state=(!show_state)? !state : show_state; //--- Output the text CTextBox::TextOut(); //--- Draw the text cursor if(state) DrawCursor(); //--- Draw the frame DrawBorder(); //--- Update the text box m_canvas.Update(); //--- Reset the counter m_counter.ZeroTimeCounter(); }

- www.mql5.com
I just need instruction on how go about it. At least mt4 code sample or link to any article on it Pls
below is the class I got from https://www.mql5.com/en/articles/3004 but I don't know how to apply it in my case
this is my suggestion:
1- add an identifier to each object (in your case arrows) to know which one has to blink. (I recommend use OBJPROP_ZORDER)
2- save start time of blinking of that specific Arrow to this property (OBJPROP_ZORDER) of that Arrow. This may done during first time you draw arrow on chart.
3- have a setting as how many seconds you want to blink like Xsec. Also another input as speed of blink like NperSec. (N Times Per Seconds).
4- code a function that checks all arrows to find out which one needs to blink yet. you may know how to do this. just compare TimeCurrent() with time you set as start of blink. if OBJPROP_TIMEFRAMES property for Arrow is OBJ_ALL_PERIODS make it OBJ_NO_PERIODS and vice versa.
5- run that function 2N times per seconds inside of OnTimer(). you will need to set Time inside of OnInit function as EventSetMillisecondTimer((int) (1000000/NperSec/2));
thats it!
- consider this may affect your indicator speed dramatically.
- if you have clicking operations on arrows, this may has another bad effect as you are playing with ZOrder continuously.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Please house, I need any help with a code snippet for blinking text in mt4
I have this graphical display board that shows so many signals for multiple currencies and timeframe. I want the arrow of new incoming signal to blink for 20 seconds using OnTimer() so I can recognize new arrow that is formed.