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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      68 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X