Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating Flashing Draw objects (e.g. ArrowsUp/Down)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating Flashing Draw objects (e.g. ArrowsUp/Down)

    Hi,

    I have built an indicator script and trying to make my arrows flash (between yellow and transparent) on the chart.

    I have created a timer event (timerBlinkEvent) and this event will call the TriggerCustomEvent to process the blinking of the arrows.

    The timer interval is set as 500 ms. But I do not see the arrows blinking on the chart. However, the events are actually trigger because i see the "blinking" printout when the Print function is called in the event

    Did i do anything wrong?

    Following are my code snipets:

    //event triggered by timer
    private void OnBlinkTimerEvent(Object source, System.Timers.ElapsedEventArgs e)
    {
    TriggerCustomEvent(ProcessBlinkHandler, 0, "blink");
    }

    //event triggered by TriggerCustormEvent
    private void ProcessBlinkHandler(object state)
    {

    if(i_BuyArrowUp != null && i_waitingTriggerBuy == true)
    {

    if(i_BuyArrowUp.Color == watiTriggerArrowColor)
    {
    Print("blinking_Up");
    i_BuyArrowUp.Color = Color.Transparent;
    }
    else
    {
    i_BuyArrowUp.Color = watiTriggerArrowColor;
    }
    }

    if(i_SellArrowDown != null && i_waitingTriggerSell == true)
    {
    if(i_SellArrowDown.Color == watiTriggerArrowColor)
    {
    Print("blinking_Dwn");
    i_SellArrowDown.Color = Color.Transparent;
    }
    else
    {
    i_SellArrowDown.Color = watiTriggerArrowColor;
    }
    }
    }

    Many Thanks in advance
    Last edited by ystan79; 03-08-2017, 11:05 PM.

    #2
    I am not sure I follow your logic but it would seem
    that you have a Print "Up" and you should really have a
    Print "UP On" and Print "UP Off" for both Up and Down in order to debug this.

    Comment


      #3
      Hello,

      Thank you for the post.

      I wanted to check, with your current test are you able to see the blinking occur if you are scrolling the chart or fast market data is coming in? Also what is the overall goal, is it just to make a blinking arrow?

      This could potentially be caused by the charts rendering not seeing anything to change while rendering. Could you provide a working example of what you have created so far? I could look further into if this could work as I am unsure from what has been provided if that is specifically the problem.

      I look forward to being of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      88 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      48 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      30 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      34 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      68 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X