Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Update Chart

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

    Update Chart

    Hi,
    I'm developing an indicator that calculates the price difference between the start
    and the end of a line user drew.

    But to get the text with value plotted on the chart I have to press F5 every time I change
    the position of the start or the end of that line.

    So how to update the indicator from within Ninjascript?

    #2
    Hello bassam,

    Thanks for your post.

    While this is not supported, after these calls try:

    ChartControl.Refresh();

    Let me know if this is not what you are looking for.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea,
      That did not work, I tried to call it from :

      public void MyMouseUpEvent(object sender, MouseEventArgs e)
      {
      Print( "Click works");
      ChartControl.Refresh();
      }

      "Click works" gets printed in the OutPut everytime I click the chart, but the chart does not refresh.

      Comment


        #4
        Hi bassam,

        I overlooked the part where you mention that this is a user drawn line.

        Currently in NinjaScript you cannot change the end points of manually drawn objects.

        While you can find the object and print all of the details of the object, a manually drawn object cannot become dynamic.

        This is somewhat mentioned in the following thread.
        http://www.ninjatrader.com/support/f....php?t=52592#6
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Dear Chelsea,
          I'm not trying to move the end of a line were drawn by the user.

          I'm trying to refresh the chart as if you pressed F5.
          Suppose you have a control button, what I need is the procedure or function that reload the chart
          again once I click it.

          Comment


            #6
            Hello bassam,

            May I see the indicator you are developing?

            If you are not comfortable posting the code in this thread, please send this to support[at]ninjatrader[dot]com Attn: Chelsea #945737.

            Also, include a link to this forum thread and please let me know what is suppose to change when pressing F5.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by mattbsea, Today, 05:44 PM
            0 responses
            3 views
            0 likes
            Last Post mattbsea  
            Started by RideMe, 04-07-2024, 04:54 PM
            6 responses
            31 views
            0 likes
            Last Post RideMe
            by RideMe
             
            Started by tkaboris, Today, 05:13 PM
            0 responses
            2 views
            0 likes
            Last Post tkaboris  
            Started by GussJ, 03-04-2020, 03:11 PM
            16 responses
            3,282 views
            0 likes
            Last Post Leafcutter  
            Started by WHICKED, Today, 12:45 PM
            2 responses
            20 views
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Working...
            X