Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ChartControl

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

    ChartControl

    I am trying to use the below command to refresh the chart, but unable to compile. I am using it in OnBarUpdate.
    The error is below, please advise.
    The name ChartControl does not exist in the current context.


    using NinjaTrader.Gui.Chart;

    if (ChartControl != null)
    {
    ChartControl.OnReloadNinjaSc riptHotKey(this, new System.Windows.Input.KeyEventArgs(Keyboard.Primary Device, PresentationSource.FromVisual(chartControl), 0, Key.F5));

    }
    Last edited by kashmiami; 08-20-2023, 01:49 PM.

    #2
    Hello kashmiami,

    Thanks for your notes.

    ChartControl.OnReloadNinjaScriptHotKey is not a documented/supported NinjaScript method/property and using this would go beyond the support we would be able to provide you with in the Support department at NinjaTrader.

    That said, this forum thread will be open for other community members to share their insight on the unsupported code to accomplish this.

    Something you might consider is using ForceRefresh() depending on your overall needs.

    ForceRefresh(): https://ninjatrader.com/support/help...rcerefresh.htm

    Or, you might find this forum thread about using SendKeys to be helpful: https://forum.ninjatrader.com/forum/...55#post1143755
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X