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 andrewtrades, Today, 04:57 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by chbruno, Today, 04:10 PM
            0 responses
            4 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            436 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            7 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            19 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X