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 sidlercom80, 10-28-2023, 08:49 AM
      169 responses
      2,269 views
      0 likes
      Last Post QuantKey_Bruce  
      Started by Irukandji, Yesterday, 02:53 AM
      2 responses
      17 views
      0 likes
      Last Post Irukandji  
      Started by adeelshahzad, Today, 03:54 AM
      0 responses
      3 views
      0 likes
      Last Post adeelshahzad  
      Started by CortexZenUSA, Today, 12:53 AM
      0 responses
      3 views
      0 likes
      Last Post CortexZenUSA  
      Started by CortexZenUSA, Today, 12:46 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Working...
      X