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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    57 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    78 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    41 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    101 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    61 views
    0 likes
    Last Post PaulMohn  
    Working...
    X