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.
      JesseNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by nightstalker, Today, 02:05 PM
      0 responses
      3 views
      0 likes
      Last Post nightstalker  
      Started by llanqui, Yesterday, 09:59 AM
      8 responses
      28 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by quicksandatl, Today, 01:39 PM
      1 response
      3 views
      0 likes
      Last Post quicksandatl  
      Started by md4866, 05-01-2024, 08:15 PM
      2 responses
      18 views
      0 likes
      Last Post md4866
      by md4866
       
      Started by samish18, Today, 12:20 PM
      0 responses
      7 views
      0 likes
      Last Post samish18  
      Working...
      X